plugin code change

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
olegus
Posts: 9
Joined: Tue Feb 05, 2019 3:05 am

plugin code change

Post by olegus »

I try to use an asterisk plugin to check check_asterisk_pri.php https://exchange.nagios.org/directory/P ... us/details
after solving some problems, it began to reach the server, but now it gives an error in the code:
root@icingadeb:/home/adman# /usr/lib/nagios/plugins/check_asterisk_pri -H xxx.xxx.xxx.xxx -U xxxxx -P xxxxxxxx -p 5038
PHP Warning: fsockopen(): unable to connect to xxx.xxx.xxx.xxx:5038 (Connection refused) in /usr/lib/nagios/plugins/check_asterisk_pri on line 163
the string itself looks like this:
if( ( $astsock = fsockopen( $host, $port, $errno, $errstr, $timeout ) ) === false )
please tell me what needs to be changed so that it would work
thank you in advance
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: plugin code change

Post by cdienger »

The service may be down or there may be a firewall preventing a connection. Is port 5038 up and listening on the asterisk server? Is there anything blocking this connection?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
olegus
Posts: 9
Joined: Tue Feb 05, 2019 3:05 am

Re: plugin code change

Post by olegus »

everything. sorted out. fail2ban blocked
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: plugin code change

Post by scottwilkerson »

olegus wrote:everything. sorted out. fail2ban blocked
Great!

Locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked