Page 1 of 1
Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 9:41 am
by BanditBBS
The upgrade went fine but q few of my checks are all failing now.
I am getting this:
Code: Select all
(No output on stdout) stderr: bash: /usr/local/nagios/libexec/check_ssh_cpu.sh: No such file or directory
If I run from command line I get this:
Code: Select all
[nagios@svcldnagios01 libexec]$ ssh [email protected] 'bash -s' -- < /usr/local/nagios/libexec/check_ssh_cpu.sh -w 80 -c 90
CPU STATISTICS OK: user=0% system=1% iowait=0% idle=99% | user=0%,system=1%,iowait=0%;80;90,idle=99%
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 10:43 am
by BanditBBS
Capture.JPG
That picture is of the service definition. You can see how I have everything defined. If I test the command it fails(runs as apache) but if I copy the command it builds to the cli it runs just fine.
the other really weird thing: It is working fine on some servers and on others. No matter what I do, I can not get it to work on the ones it is for some reason not working on.
Just to show you the command in the pic working:
Code: Select all
[nagios@svcldnagios01 ~]$ ssh [email protected] 'perl - -w 10 -c 5 -f -C' -- < /usr/local/nagios/libexec/check_mem2
OK - 61.1% (2507984 kB) free.|TOTAL=4107247KB;;;; USED=1599263KB;;;; FREE=2507984KB;;;; CACHES=1862064KB;;;;
EDIT: Over 1000 posts

Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 11:22 am
by GldRush98
Have you compared file owner/group as well as permissions between working and nonworking servers?
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 11:26 am
by BanditBBS
GldRush98 wrote:Have you compared file owner/group as well as permissions between working and nonworking servers?
File owner/group is fine. Let me clarify, I didn't mean nagios servers, I meant defined hosts in XI.
As stated, I am in the cli as the nagios user and run it from the cli and it works fine. This has got to deal with the new way nagios 4 handles parsing check commands, but I just have no clue how to resolve!
EDIT: After further examiniation the same service is not working, however, they are configured the exact same.
Doesn't work:
Code: Select all
define service {
service_description System Memory
use system_checks
hostgroup_name system_checks_hypervisors
servicegroups system
check_command check-ssh-local-perl!check_mem2!!-w 10 -c 5 -f -C!!!!!
contact_groups primary_sys_admins
register 1
}
Works:
Code: Select all
define service {
service_description System Memory
use system_checks
hostgroup_name system_checks_solaris
servicegroups system
check_command check-ssh-local-perl!check_mem2!!-w 10 -c 5 -f -C!!!!!
contact_groups primary_sys_admins
register 1
}
Anyone care to guess why the one works and the other does not?
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 1:02 pm
by BanditBBS
I fixed it, not like I would want, but it works.
Something about core 4 just doesn't like the commands, so I wrote a few wrapper scripts to handle the few ssh checks I have setup and all is well.
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 1:56 pm
by sreinhardt
I know we are changing how this presently works in core 4, but I am almost 100% certain there were no differences in that logic from 2014r1.0 to 1.1. Was this previously a 2012 server that was updated to 1.1? I think this is a good test case for us to see if the changes that the core dev has been working on properly! As a side note, more out of curiosity, any reason you are not using check_by_ssh instead?
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 1:59 pm
by BanditBBS
yes, this was a 2012 server this morning.
I am using my check instead of check_by_ssh because my check runs the script locally off of the nagios server so I only have to keep it updated in one location instead of every server. (Will be in my cool tips and tricks presentation at the conference

)
Re: Upgrade to 2014 1.1 Issues
Posted: Tue Jun 10, 2014 4:06 pm
by sreinhardt
Thanks for indulging me with that! The core dev agrees it's a wee bit strange and kinda scary but it's an awesome use case for his testing. Locking this up for now.