Upgrade to 2014 1.1 Issues

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

Upgrade to 2014 1.1 Issues

Post 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%
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: Upgrade to 2014 1.1 Issues

Post 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 :)
You do not have the required permissions to view the files attached to this post.
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
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Upgrade to 2014 1.1 Issues

Post by GldRush98 »

Have you compared file owner/group as well as permissions between working and nonworking servers?
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Upgrade to 2014 1.1 Issues

Post 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?
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: Upgrade to 2014 1.1 Issues

Post 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.
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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Upgrade to 2014 1.1 Issues

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Upgrade to 2014 1.1 Issues

Post 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 :) )
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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Upgrade to 2014 1.1 Issues

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked