Hi.
We use the snmptrap sender from Core to a notification tool.
In XI, there is a "Manage Components" check box that tells you if the sender is active.
Aside from the fact that Core doesn't have this dialog, I need to be able to get this status programmatically (from perl).
Is this do-able?
Thanks,
Rick
Check whether snmp sender is active
Re: Check whether snmp sender is active
Are you trying to use the SNMP Trap Sender component meant for XI with Core?
If so, the XI trap sender component stores the data in the nagiosxi DB under the xi_options table, Core doesn't have the DB so it's not compatible.
The SQL that would grab it would be:
The problem is that it's stored as a php serialized array so you can either unserialize it and process it as an array or you could just search for:
If enabled:
If disabled:
It would be up to you to setup a perl script to grab that information.
If that is not what you're doing or trying to do, please be more specific.
If so, the XI trap sender component stores the data in the nagiosxi DB under the xi_options table, Core doesn't have the DB so it's not compatible.
The SQL that would grab it would be:
Code: Select all
select value from xi_options where name = 'snmptrapsender_component_options';
If enabled:
Code: Select all
"enabled";i:1
Code: Select all
"enabled";i:0
If that is not what you're doing or trying to do, please be more specific.