06-03-2019 11:21 AM
Hello,
I need to monitor status of VLN on a number of ESA machines (ver. 12.1). I can check its status using CLI command 'showlicense'. I also receive alerts on email when something happens but I'd want not to rely on emails, but rather to get a Jira ticket.
We use Nagios for performing such service checks. Could you please help me to find out how can I query my ESAs using curl or similar tool to create some script for Nagios so it will create a Jira ticket for me when VLN is going to be expired?
Thanks,
Andrii
06-03-2019 07:04 PM - edited 06-03-2019 07:07 PM
Hello,
I was not able to find this via the API, but you can use cURL to pull the XML status page which has time remaining left on your feature keys.
curl -k https://esa.example.com/xml/status -u admin:cisco123
Sample output (time_remaining is in seconds) :
<features>
<feature name="McAfee" time_remaining="6474843"/>
<feature name="Cloudmark SP" time_remaining="6474843"/>
<feature name="IronPort Image Analysis" time_remaining="6474843"/>
<feature name="Sophos" time_remaining="6474843"/>
<feature name="File Analysis" time_remaining="6474843"/>
<feature name="Bounce Verification" time_remaining="5178843"/>
<feature name="IronPort Anti-Spam" time_remaining="6474843"/>
<feature name="IronPort Email Encryption" time_remaining="6474843"/>
<feature name="Data Loss Prevention" time_remaining="6474843"/>
<feature name="Intelligent Multi-Scan" time_remaining="6474843"/>
<feature name="File Reputation" time_remaining="6474843"/>
<feature name="Incoming Mail Handling" time_remaining="6558033"/>
<feature name="Graymail Safe Unsubscription" time_remaining="-16962900"/>
<feature name="Outbreak Filters" time_remaining="6474843"/>
</features>
Hopefully, this helps.
Thanks!
-Dennis M.
06-18-2019 03:26 AM
06-18-2019 09:03 AM
Hello,
Thanks for the update. There is no variable specific to the VLN that I am aware of. In general, though, the VLN end date should be when the feature keys expire. You could potentially create a script to log in and run the showlicense command and grab the dates from there?
Thanks!
-Dennis M.
06-19-2019 01:08 AM
06-20-2019 02:03 PM
Hello,
It sounds like you may be running the command at the cluster level, and we would want to run showlicense at the machine level.
You could potentially try something like this.
clustermode machine esa.test.com; showlicense
Thanks!
-Dennis M.
06-21-2019 03:58 AM
06-21-2019 06:32 AM
I don't use Virtual appliances to test on.
I assume you are trying to get to machine mode...
create command file
clustermode
3
<blank line here as taking default>
showlicense
( the carriage returns will be sending the command and the blank line to inherit the default, which will be current machine you are logged onto )
Create script file
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set dt=%date:~-4,4%%date:~-7,2%%date:~-10,2%_%hh%%time:~3,2%%time:~6,2%
start echo y | plink -i "<path to ppk" <username>@<hostname> -m "<path to command file" > "path to log_%dt%.log" 2>&1
Or use Expect if available, or try to manipulate the above to work in your processes.
Thanks
Paul
06-21-2019 07:22 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide