Does NetXMS support NAGIOS?

Started by geekton, December 12, 2008, 07:57:39 PM

Previous topic - Next topic

geekton

I was just wondering if there is a way to interact NetXMS with NAGIOS. I'm asking that because me and my team are trying to implement a new tool that can monitor some SNMP traffic on our switches, and we all already work with NAGIOS.

So, can n1 ask me that?

Appreciate.

Alex Kirhenshtein

Short answer - yes, you can.

NetXMS gathers data in multiple ways:

  • Common ways - initiated by server (NetXMS agent build-in checks, SNMP, WMI, etc.)
  • External application can push data (and events) into NetXMS from external source using nxpush / nxevent tools. We use for integration with HP ServiceDesk, for example
  • "External Parameter" can be defined for NetXMS agent. Basically, it just an application / script which output some value. This method commonly used for parameters not provided by core agent and subagents.

Solution depends on integration level you want to achieve.
If you need only events in NetXMS (e.g. "Out of disk space", "Node Down", etc.) - you can setup Nagios to execute nxevent when something happens to push event into NetXMS. This can be done with little effort.

If you want to have not only events but data too (e.g. amount of free space for every minute), you can use two ways:

  • Use nxpush and execute it periodically by Nagios / cron.
  • Create script(s) which extract data from Nagius and configure agent to run this script as "external parameter"

This should work, but I should warn you that this way can require a lot of effort to make it work (depends on the size of your network). If you want to see all collected in NetXMS - I'd suggest to install our agent on each node.

Victor Kirhenshtein

Some additional comments:

Nagios plugin API is very simple - basically, plugin is an executable which return code indicates status of tested service (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN), and one or more lines of text. So, you can run any nagios plugin from NetXMS agent as external parameter, and get either status code or first line of text output. For example, to get status code, add following line to nxagentd.conf:


ExternalParameter = NagiosTest1:nagios_plugin > /dev/null ; echo $?


and for capturing first line of plugin's text output simply


ExternalParameter = NagiosTest2:nagios_plugin


Best regards,
Victor