KSC

Kaspersky Security Center monitoring helper

PS-Check

KSC Miner

This is a little Powershell script help to fetch metric’s values from Kaspersky Security Center (KSC).

Actual release 0.99

Tested on:

Supported objects:

Virtual keys for ‘Host’ object are:

Virtual keys for ‘License’ object are:

Virtual keys for ‘Server’ object are:

Actions

How to use standalone

# Make Zabbix's LLD JSON for Licenses on Kaspersky Security Center Server
powershell.exe -NoProfile -ExecutionPolicy "RemoteSigned" -File "ksc.ps1" -Action "Discovery" -ObjectType "License"

# Get number of Hosts which have Critical State 
... "ksc.ps1" -Action "Count" -ObjectType "Host" -Key "Status.Critical" -consoleCP CP866

# Get expiration date of license with "1C1C-000423-1323DEA0" serial number
... "ksc.ps1" -Action "Get" -ObjectType "License" -Key "KLLIC_LIMIT_DATE" -Id "1C1C-000423-1323DEA0"

How to use with Zabbix

  1. Just include zbx_ksc.conf to Zabbix Agent config;
  2. Put ksc.ps1 to _C:\zabbix\scripts_ dir;
  3. Set Zabbix Agent’s / Server’s Timeout to more that 3 sec (may be 10 or 30);
  4. Import template to Zabbix Server;
  5. Watch to Zabbix’s Latest Data.

Note Do not try import Zabbix v2.4 template to Zabbix pre v2.4. You need to edit .xml file and make some changes at discovery_rule - filter tags area and change # to <> in trigger expressions. I will try to make template to old Zabbix.

Note It is possible that you will need to provide the script with the credentials of user from the KLAdmins group to connect to the server. Refer to Username / Userpass / UserDomain options.

Note All available options are described in head of the script file.

Hints

Beware frequent requests to PowerShell script eat CPU and increase Load. To avoid it - don’t use small update intervals with Zabbix’s Data Items and disable unused.