Jump to content

Automate Agent Licenses Available 1.0.1

   (3 reviews)

About This File

This monitor will compare the number of available licenses to the value in Result. This value will be customized based on the number of agents you are currently licensed for, but you can change the value to be warned earlier or later. The Identity field reports the available agent licenses in increments of 10. This means that the monitor identity will be "50" when between 41 and 50 licenses remain, and "40" when between 31 and 40 remain. In this way a unique alert will be triggered each time the available count is reduced by 10 (or more). If you do not want new alerts as the remaining count continues dropping below the threshold, set the identity field to "computers.computerid" (no quotes).

The Duplicate Alert Frequency is set to Once per 7 days. So after 1 week another alert would generate even if the available count did not change. Set to "Send Fail After Success" if you do not want any repeat notifications for the same "incident".

The Alert Template should default to the stock "Create Ticket" alert. I would suggest this be changed to an alert template that generates an email so that the notice can be sent directly to the person who manages agent licenses. 

NOTE: The monitor is designed to alert against the Automate Server (where the "LTAgent" service is Running).  If you don't have an agent on your Automate Server, the monitor falls back to Computer ID 1. If you don't have THAT agent the monitor won't work.  To change the fallback computer ID, edit the Additional Condition and update "IFNULL(MAX(computerid),1)", replacing "1" with whatever computer you want to generate the alert against.

Install Instructions: Unzip the attached file, and import into Control Center using "Tools -> Import -> SQL File". The Internal Monitor name will be "CWAutomate Agent Licenses Available".

  • Thanks 5

User Feedback

Recommended Comments

I've imported this now and trying to test that it works. I would love some help if possible, is there a way to see or test this monitor in Automate 12. When I do a build and view query no results are returned at all :(

Link to comment
Share on other sites

On 2/24/2019 at 4:26 PM, BenF said:

I've imported this now and trying to test that it works. I would love some help if possible, is there a way to see or test this monitor in Automate 12. When I do a build and view query no results are returned at all :(

This is GOOD, if you have plenty of licenses available. The monitor will alert if the number of available licenses is below the "Result" value.

To test this, you can edit the monitor (don't save) and change the Result field to a large number. Then hit Build and View, and it should return 1 row for the alert.

Link to comment
Share on other sites

We were running out of licences. I changed the Check Condition from 40 to 400 and ran it and still had issues. When I run the built query manually, it comes up empty. Running Automate 2019.4 here:

 

image.png.663ab424a167a78a3e81135f4da525ca.pngimage.png.0e78cf588c9b21696083a38c37ff2842.png

 

 

 

Edited by BenF
Link to comment
Share on other sites

Great screenshots @BenF, very helpful. The monitor is "trying" to alert against only 1 computer, and it is looking for the computer with Automate installed. (Where LTAgent=Running).  If you don't have an agent for it, it falls back to using ID 1. If you don't have THAT agent, then it won't work.

So, edit the "IFNULL(MAX(computerid),1)" section in the Additional Condition and replace "1" with whatever computer you want to have the alert to generate against. I think that will resolve your issue.

Link to comment
Share on other sites

Hi @DarrenWhite99,

I am a bit confused about what number I should put in the Result field. Should it be set to the number of max licences we are allowed according to our plan ? Or is it the number of remaining licences I want to be warned at ?

We are currently allowed 650 agents and would like to be warned whenever there are 15 agents left. We don't want any new alerts whenever the number continues to drop, and we don't have an agent installed on the Automate Server, but we have AgentID 2 (a standard server with an automate agent installed on).

Can you confirm whether this config would make sens ? I set 635 in result (which won't warn us until we reach 635 agents and gives us a threshold of 15 agents).

image.png.26c268d993b48db70274c52bd8587fdc.png

If I run this query, it return "Total result:1" whic his the AgentID2.

image.png.379f0201c9779340fecb76e134306b06.png

But then it seems an error is detected and no alert is triggered.

image.png.73edf065c4e742f6041c1b886b057b95.png

Thank you very much

 

Link to comment
Share on other sites

On 5/13/2020 at 8:05 AM, Dominic B said:

Hi @DarrenWhite99,

I am a bit confused about what number I should put in the Result field. Should it be set to the number of max licences we are allowed according to our plan ? Or is it the number of remaining licences I want to be warned at ?

The monitor automatically sets the threshold for you. But result is the level of free licenses you want to be warned at.

You need to make sure the alert template is valid. If you want a ticket, use a template that generates a ticket. To send email, use a template that sends an email. Etc. 

Link to comment
Share on other sites

Great stuff, still working on 2021.8 and above. Seems like a great monitor to build in as a default for every environment!

Link to comment
Share on other sites

I had to make a few changes to this monitor for the current version of CWA 2022.5 (Patch 5)

1: The Additional Condition statement, you need to replace the 1 in (MAX(computerid),1) so if your Automate Server's Agent ID is 1234 you would put (MAX(computerid),1234)

2: Default the monitor user 90 free licenses as the default trigger and doesn't care what you put in the Result field for number of free licenses.  In my testing I put 87 but the alert always said 90.
That is happening because of this query in the Identify Field (SELECT 10*CEILING((MAX(DynamicClients)-COUNT(*))/10) FROM computers JOIN config) It always selects 90.  so I updated it to (SELECT CEILING((MAX(DynamicClients)-(5450))) FROM computers JOIN config)
That 5450 is our total count of agents (5500) minus the number of licenses I want it to alert against, so I want it to alert when we get to less than 50 do 5500-50 = 5450.
Now my ticket shows the proper data.

Link to comment
Share on other sites

  

On 6/3/2022 at 7:08 AM, nkalapodis said:

I had to make a few changes to this monitor for the current version of CWA 2022.5 (Patch 5)

1: The Additional Condition statement, you need to replace the 1 in (MAX(computerid),1) so if your Automate Server's Agent ID is 1234 you would put (MAX(computerid),1234)

That is already called out in the instructions. It automatically uses your Automate server id if you have an agent on your server. if you don't have an agent on your server you need to change 1 to whatever computerid you want to alert against.

On 6/3/2022 at 7:08 AM, nkalapodis said:

I had to make a few changes to this monitor for the current version of CWA 2022.5 (Patch 5)

2: Default the monitor user 90 free licenses as the default trigger and doesn't care what you put in the Result field for number of free licenses.  In my testing I put 87 but the alert always said 90.
That is happening because of this query in the Identify Field (SELECT 10*CEILING((MAX(DynamicClients)-COUNT(*))/10) FROM computers JOIN config) It always selects 90.  so I updated it to (SELECT CEILING((MAX(DynamicClients)-(5450))) FROM computers JOIN config)
That 5450 is our total count of agents (5500) minus the number of licenses I want it to alert against, so I want it to alert when we get to less than 50 do 5500-50 = 5450.
Now my ticket shows the proper data.

I do not recommend this modification. Changing as described above will result in a new alert generating every time the license count changes by 1. So it would alert when you have 87 licenses, and then again when you have 86, and again when you have 85, etc.. The formula was used to make the value always change in a increment of 10 so that it is less sensitive. The alert doesn't report EXACTLY how many licenses you have, it reports that you are BELOW a number of licenses. So if you alert when you have 87 free, you have LESS THAN 90, so 90 is reported. Anything from 81-90 would report LESS THAN 90, and then when you hit 80 or less it changes to LESS THAN 80, etc. Going from 87 to 0 free licenses would generate 10 alerts in total, vs. generating nearly 90 alerts if modified as you suggested.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...