Nagios Quick Action question

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Nagios Quick Action question

Post by SteveBeauchemin »

Hi,

I am looking at making use of Quick Actions, and extending Nagios XI to send data to 'places'. So I am looking at the variable names that can be passed.
My question is about the hostchecktype variable.

Looking in the code, the function actions_component_get_host_vars and function actions_component_get_service_vars
are in place in the file actions.inc.php (in /usr/local/nagiosxi/html/includes/components/actions)

The Host Function shows this:
(near line 1116) :

Code: Select all

"hostchecktype" => strval($hoststatus_xml->hoststatus->check_type),
The Service Function shows both of these:
(near line 1227) :

Code: Select all

"hostchecktype" => strval($servicestatus_xml->servicestatus->check_type),
and
(near line 1258) :

Code: Select all

"hostchecktype" => strval($servicestatus_xml->servicestatus->host_check_type),
In the Service Function, should line 1227 be servicechecktype?

Is that a typo? It looks like to 2 variable names conflict.

Just wondering...

Thanks.

Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Quick Action question

Post by ssax »

No, it is proper. Both DB fields are called check_type so the host one is labeled as host_check_type in the SQL query to differentiate them. The first one you posted is only querying the host so an alternate label is not needed.
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Nagios Quick Action question

Post by SteveBeauchemin »

so is there no servicechecktype?
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Quick Action question

Post by ssax »

Actually, after looking at it again, you are correct. :oops:

Line 1227 (or thereabouts) should be:

Code: Select all

"servicechecktype" => strval($servicestatus_xml->servicestatus->check_type),
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: Nagios Quick Action question

Post by SteveBeauchemin »

okay, I'm not crazy... Please close this up - after you fix it in your code for the future...

Thanks
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Quick Action question

Post by lmiltchev »

Thanks for reporting this, SteveBeauchemin! I am closing the thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked