External Commands not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

External Commands not working

Post by BanditBBS »

XI 5.7.1 clicking any of the quick actions has nothing happen. Acknowledge box comes up and when submit nothing is submitted and disabling notification shows command submitted but they are still enabled and force immediate check shows submitted but again, nothing happens.

Command file:

Code: Select all

prw-rw---- 1 nagios nagcmd 0 Jun 22 15:01 /usr/local/nagios/var/rw/nagios.cmd
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: External Commands not working

Post by BanditBBS »

After more troubleshooting, its just this one service, all other work.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: External Commands not working

Post by lmiltchev »

After more troubleshooting, its just this one service, all other work.
So, do you want to troubleshoot the issue with this particular service or it is OK to close this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: External Commands not working

Post by BanditBBS »

Ludmil, I'd love to troubleshoot and figure out why none of the "Quick tools" work on it. This honestly may be the craziest thing I'd ever seen in my use of XI, LOL.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: External Commands not working

Post by lmiltchev »

This is definitely a puzzler... the "Quick tools" not working only for one service... I would love to be able to recreate it in house. Is there anything "special" about this service? Can you show us the service definition, along with any other relevant objects, e.g. template and/or command used by the service?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: External Commands not working

Post by BanditBBS »

Code: Select all

define service {
    host_name                 ssql12
    service_description       SSQL12 - Deadlocks
    use                       db-service-60
    servicegroups             ssql12
    check_command             check_xi_mssql_server!-U Nagios -P ******** --deadlocks -w 20 -c 30!!!!!!!
    contacts                  ferrarim2,global-dba-monitoring,hhmi_int,monitoring-alerts,sanchezm2,vpn-itconvergence-dba-sql
    contact_groups            sql
    register                  1
}
and

Code: Select all

define service {
    name                            db-service-60
    service_description             DB Service Check Every 60 Minutes
    is_volatile                     0
    max_check_attempts              3
    check_interval                  60
    retry_interval                  2
    active_checks_enabled           1
    passive_checks_enabled          1
    check_period                    24x7
    parallelize_check               1
    obsess_over_service             1
    check_freshness                 0
    event_handler_enabled           1
    flap_detection_enabled          1
    process_perf_data               1
    retain_status_information       1
    retain_nonstatus_information    1
    notification_interval           0
    notification_period             24x7
    notification_options            w,c,u,r,
    notifications_enabled           1
    register                        0
}
The interesting thing to note is they monitor a bunch of SQL databases and have this check configured the EXACT same except for host_name and service description and the quick tools work fine for them.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: External Commands not working

Post by lmiltchev »

I set up a similar service on my test XI box, but I was not able to recreate the issue. I forced an immediate check, which worked just fine. Also, I disabled notifications under the "Quick Actions" section - again no issues.

Just wondering - are you logged in as nagiosadmin or another user when using the "Quick Actions" tools? If you are logged in as another user, can you show us the security settings of this user?

Admin > Manage Users > <your user> > Edit
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: External Commands not working

Post by BanditBBS »

Yes, logged in as nagiosadmin.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: External Commands not working

Post by lmiltchev »

Hmm... Can you disable notifications on this service by running the command below?

Code: Select all

curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/corecommand?apikey=xxx" -d "cmd=DISABLE_SVC_NOTIFICATIONS;ssql12;SSQL12 - Deadlocks"
What do you see in the nagios.log?

Code: Select all

grep DISABLE_SVC_NOTIFICATIONS /usr/local/nagios/var/nagios.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: External Commands not working

Post by BanditBBS »

Trying from commandline using the api worked fine:

Code: Select all

{"cmd":"DISABLE_SVC_NOTIFICATIONS;ssql12;SSQL12 - Deadlocks","success":"Command submitted"}
and the notifications are now disabled.

Nothing in the nagios.log when doing the grep.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked