NRPE: Unable to read output
NRPE: Unable to read output
Hello
trying to view sip registration status
I use plugin check_asterisk_sip_peers
Nagios server command line: /usr/lib/nagios/plugins/check_nrpe -H 192.168.111.220 -p 5666 -c check_asterisk_sip_peers
Exit: NRPE: Unable to read output
Remote servercommand line (local) : /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
Exit:
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
OK: [email protected] (not active)
I'm not sure that the conclusion should be exactly that, but that is - that is. then I will understand
but I already broke my whole head up with the output on the server of Nagios
HELP!!))
trying to view sip registration status
I use plugin check_asterisk_sip_peers
Nagios server command line: /usr/lib/nagios/plugins/check_nrpe -H 192.168.111.220 -p 5666 -c check_asterisk_sip_peers
Exit: NRPE: Unable to read output
Remote servercommand line (local) : /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
Exit:
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
OK: [email protected] (not active)
I'm not sure that the conclusion should be exactly that, but that is - that is. then I will understand
but I already broke my whole head up with the output on the server of Nagios
HELP!!))
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NRPE: Unable to read output
can you execute this on the remote server?
did you get the plugin from here
https://exchange.nagios.org/directory/P ... rs/details
If so did you do this
Code: Select all
su nagios
/usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrationshttps://exchange.nagios.org/directory/P ... rs/details
If so did you do this
What does your command line in the nrpe.cfg look like? Is it prefixed with sudo?This plugin calls the asterisk executable directly, so make sure that the user
executing this script has appropriate permissions! Usually the asterisk binary
can only be run by the asterisk user or root. To grant the nagios user
permissions to execute the script, try something like the following in your
/etc/sudoers file:
nagios ALL=(ALL) NOPASSWD: /path/to/plugins/directory/check_asterisk_peers
Re: NRPE: Unable to read output
#command[check_sip]=/usr/lib64/nagios/plugins/check_sip $ARG1$scottwilkerson wrote:can you execute this on the remote server?"[root@freepbx home]# su nrpeCode: Select all
su nagios /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
This account is currently not available."
user nrpe
did you get the plugin from here
https://exchange.nagios.org/directory/P ... rs/details
If so did you do thisWhat does your command line in the nrpe.cfg look like? Is it prefixed with sudo?This plugin calls the asterisk executable directly, so make sure that the user
executing this script has appropriate permissions! Usually the asterisk binary
can only be run by the asterisk user or root. To grant the nagios user
permissions to execute the script, try something like the following in your
/etc/sudoers file:
nagios ALL=(ALL) NOPASSWD: /path/to/plugins/directory/check_asterisk_peers
command[check_asterisk_sip_peers]=sudo /usr/lib64/nagios/plugins/check_asterisk_sip_peers.sh $ARG1$
#command[check_asterisk_version]=/usr/lib64/nagios/plugins/nagisk.pl -c version
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NRPE: Unable to read output
Can you answer the rest of the questions?
Re: NRPE: Unable to read output
answered, but apparently the message did not pass.
I'll repeat now
I'll repeat now
Re: NRPE: Unable to read output
#command[check_sip]=/usr/lib64/nagios/plugins/check_sip $ARG1$scottwilkerson wrote:can you execute this on the remote server?for some reason(user nrpe)Code: Select all
su nagios /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
[root@freepbx home]# su nrpe
This account is currently not available.
did you get the plugin from here
https://exchange.nagios.org/directory/P ... rs/details
If so did you do thisfile path in sudoers registeredThis plugin calls the asterisk executable directly, so make sure that the user
executing this script has appropriate permissions! Usually the asterisk binary
can only be run by the asterisk user or root. To grant the nagios user
permissions to execute the script, try something like the following in your
/etc/sudoers file:
nagios ALL=(ALL) NOPASSWD: /path/to/plugins/directory/check_asterisk_peers
User_Alias NRPE = nagios,nagcmd
Cmnd_Alias NRPECOMMANDS = /sbin/service
Default:NRPE !requiretty
NRPE ALL=(ALL) NOPASSWD: NRPECOMMANDS
nrpe ALL=(ALL)NOPASSWD: /usr/lib64/nagios/plugins/check_asterisk_peers
What does your command line in the nrpe.cfg look like? Is it prefixed with sudo?
command[check_asterisk_sip_peers]=sudo /usr/lib64/nagios/plugins/check_asterisk_sip_peers.sh $ARG1$
#command[check_asterisk_version]=/usr/lib64/nagios/plugins/nagisk.pl -c version
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NRPE: Unable to read output
Your command in nrpe is
but in sudoers is
change this to
Code: Select all
/usr/lib64/nagios/plugins/check_asterisk_sip_peers.shCode: Select all
nrpe ALL=(ALL)NOPASSWD: /usr/lib64/nagios/plugins/check_asterisk_peersCode: Select all
nrpe ALL=(ALL)NOPASSWD: /usr/lib64/nagios/plugins/check_asterisk_sip_peers.shRe: NRPE: Unable to read output
change
root@icingadeb:/home/adman# /usr/lib/nagios/plugins/check_nrpe -H 192.168.111.34 -c check_asterisk_sip_peers
connect to address 192.168.111.34 port 5666: Connection refused
connect to host 192.168.111.34 port 5666: Connection refused
lokal
[root@freepbx ~]# /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
OK: [email protected] (not active)
root@icingadeb:/home/adman# /usr/lib/nagios/plugins/check_nrpe -H 192.168.111.34 -c check_asterisk_sip_peers
connect to address 192.168.111.34 port 5666: Connection refused
connect to host 192.168.111.34 port 5666: Connection refused
lokal
[root@freepbx ~]# /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
OK: [email protected] (not active)
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NRPE: Unable to read output
this looks like NRPE might not be running on the clientolegus wrote:root@icingadeb:/home/adman# /usr/lib/nagios/plugins/check_nrpe -H 192.168.111.34 -c check_asterisk_sip_peers
connect to address 192.168.111.34 port 5666: Connection refused
connect to host 192.168.111.34 port 5666: Connection refused
I am not familiar with the plugin so you may want to reach out to the author (listed at the top of the plugin) but I did look at the code and it is trying to bring in config files fromolegus wrote:[root@freepbx ~]# /usr/lib64/nagios/plugins/check_asterisk_sip_peers -r [email protected] --verify-registrations
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
cat: sip_general_additional.conf: No such file or directory
cat: sip_general_custom.conf: No such file or directory
cat: sip_nat.conf: No such file or directory
cat: sip_registrations_custom.conf: No such file or directory
cat: sip_registrations.conf: No such file or directory
cat: sip_custom.conf: No such file or directory
cat: sip_additional.conf: No such file or directory
cat: sip_custom_post.conf: No such file or directory
OK: [email protected] (not active)
Code: Select all
/etc/asterisk/sip.confCode: Select all
cat /etc/asterisk/sip.confRe: NRPE: Unable to read output
I apologize for such a long response
contacted the developer, he does not remember anything about this plugin
found the file /etc/asterisk/@sip.conf.
fixed in the plugin code by adding @
cat: /etc/asterisk/@sip.conf: No such file or directory
cat: /etc/asterisk/@sip.conf: No such file or directory
OK: [email protected] (not active)
added file permission
the picture is the same
contacted the developer, he does not remember anything about this plugin
found the file /etc/asterisk/@sip.conf.
fixed in the plugin code by adding @
cat: /etc/asterisk/@sip.conf: No such file or directory
cat: /etc/asterisk/@sip.conf: No such file or directory
OK: [email protected] (not active)
added file permission
the picture is the same