Nagios Service Output Displays Random Numbers
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios Service Output Displays Random Numbers
Thanks smith!
Also, please show us the check_nrpe command you are running for Core along with the output.
It's possible you'll find https://assets.nagios.com/downloads/nag ... e/NRPE.pdf useful.
Also, please show us the check_nrpe command you are running for Core along with the output.
It's possible you'll find https://assets.nagios.com/downloads/nag ... e/NRPE.pdf useful.
Re: Nagios Service Output Displays Random Numbers
Okay, I will try that. I ran cat for /etc/passwd and nagios is listed as:
^On the remote machine
Could this have any affect on the issue?
Code: Select all
nagios:x:123:131::/var/lib/nagios:/bin/falseCould this have any affect on the issue?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios Service Output Displays Random Numbers
The following is the format I would like to see:
Also, there's nothing referencing inxi in your nrpe.cfg, so that will need to be corrected.
Yes, the nagios user should have /bin/bash (or wherever bash is installed).
Code: Select all
root@nagios:/usr/local/nagios/libexec# ./check_nrpe -H REMOTEHOST -c inxi
outputYes, the nagios user should have /bin/bash (or wherever bash is installed).
Re: Nagios Service Output Displays Random Numbers
I cannot su in the nagios user, after I entered its password I remain as the same user. Do I need to install Nagios Core on the remote machine? Or do I just need to add a user named nagios?
Also, is the line you created what I should have for the nagios command?
Also, is the line you created what I should have for the nagios command?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Nagios Service Output Displays Random Numbers
You need to change nagios
123:131::/var/lib/nagios:/bin/false to nagios
123:131::/var/lib/nagios:/bin/bash, or, again, wherever bash is installed. What is the output of which bash?
Re: Nagios Service Output Displays Random Numbers
The output is /bin/bash
How would I go about changing nagios
123:131::/var/lib/nagios:/bin/false to nagios
123:131::/var/lib/nagios:/bin/bash?
How would I go about changing nagios
Re: Nagios Service Output Displays Random Numbers
You could run this command as root to change nagios login shell to /bin/bash.
Code: Select all
chsh -s /bin/bash nagios Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Service Output Displays Random Numbers
Thanks @tgriep, change successful.
@dwhitfield where do you want to see this?
@dwhitfield where do you want to see this?
Code: Select all
root@nagios:/usr/local/nagios/libexec# ./check_nrpe -H REMOTEHOST -c inxi
outputRe: Nagios Service Output Displays Random Numbers
I think he wants you to run the command on the Nagios server and replace REMOTEHOST with the IP address on the system you want to run the inxi command.
One thing, I did not see the command defined in the nrpe.cfg file. Did you define it in another config file?
One thing, I did not see the command defined in the nrpe.cfg file. Did you define it in another config file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Service Output Displays Random Numbers
The inxi command is printing out different colors for the text and that is causing the issue.
Edit your command and add the following option to the command that is defined in nrpe and that should fix the issue.
The -c 0 option sets the color scheme to none.
Edit your command and add the following option to the command that is defined in nrpe and that should fix the issue.
Code: Select all
-c 0Be sure to check out our Knowledgebase for helpful articles and solutions!