HP SIM Monitoring

HP Sim Monitoring

A check Plugin that connects to the HP SIM Database and fetches the needed fields to display the Errors and States of SIM in Icinga.


On the Icinga Host you need:

Perl and modules (DBI, Getopt::Long,POSIX)
Database connector (freetds)
Icinga or Nagios

On the SIM host(s) you need:

SQL Server Management Studio Express to create the necessary views (available for free) A SQL Express database user with sufficient rights to access the views Two additional Views in HP SIM Database (Maybe you could also create them on the fly with the plugin) The Views

The check_sim Plugins rely on internal views of HP SIMs SQL Database. To create them use SQL Server Management Studio Express to connect to your HP SIM Database and create the following new views by right click on the “Views†folder in your SQL Object Browser beneath the “Insight_v50… †database

SIM Healthstatus (HS):

SELECT Name, OverallStatus, timestamp FROM dbo.devices
and save as icinga_status_health

SIM Eventstatus (ES):

SELECT dbo.R_Inventory.DeviceKey, dbo.R_Inventory.DeviceName, dbo.simAggrStatus.evStatus, dbo.devices.timestamp FROM dbo.R_Inventory INNER JOIN dbo.simAggrStatus ON dbo.R_Inventory.DeviceKey = dbo.simAggrStatus.DeviceKey INNER JOIN dbo.devices ON dbo.R_Inventory.DeviceKey = dbo.devices.DeviceKey
and save as icinga_status_event

Database connector FreeTDS:

To establish a database connection to MySQL (Express) Server you need the connector tool freetds. In my case on Ubuntu Linux you can install the following packages out of the apt repository

aptitude install freetds-bin freetds-common freetds-dev libdbd-freetds

After installation you need to add a new database connector configuration in /etc/freetds.conf

 host = ip/hostname of your HP SIM Database host
 port = 1433
 tds version = 7.0

The Icinga command definition

HP Systems Insight Manager:
define command {
 command_name            check_sim_event
 command_line            $USER1$/check_sim_eventstatus.pl --server=$ARG1$
define command {
 command_name            check_sim_health
 command_line            $USER1$/check_sim_healthstatus.pl --server=$ARG1$

The Icinga service definition:

define service{
   use                             generic-service
   host_name                       somehost
   service_description             HP SIM EventStatus somehost
   check_command                   check_sim_event!somehost
define service{
   use                             generic-service
   host_name                       somehost
   service_description             HP SIM HealthStatus somehost
   check_command                   check_sim_health!somehost


To test if the plugin is working and the database connection can be established simply run the following command:

/path/to/plugin/check_sim_healthstatus.pl --all=y

Full Guide:

For the full usage and installation guide checkout the Documentation