Page 1 of 2
External Commands not working
Posted: Mon Jun 22, 2020 3:10 pm
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
Re: External Commands not working
Posted: Mon Jun 22, 2020 3:12 pm
by BanditBBS
After more troubleshooting, its just this one service, all other work.
Re: External Commands not working
Posted: Mon Jun 22, 2020 3:48 pm
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?
Re: External Commands not working
Posted: Tue Jun 23, 2020 8:27 am
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.
Re: External Commands not working
Posted: Tue Jun 23, 2020 9:05 am
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?
Re: External Commands not working
Posted: Tue Jun 23, 2020 9:43 am
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.
Re: External Commands not working
Posted: Tue Jun 23, 2020 10:40 am
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
Re: External Commands not working
Posted: Tue Jun 23, 2020 11:20 am
by BanditBBS
Yes, logged in as nagiosadmin.
Re: External Commands not working
Posted: Tue Jun 23, 2020 11:46 am
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
Re: External Commands not working
Posted: Tue Jun 23, 2020 1:08 pm
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.