Page 1 of 1
Error adding plugin check_apachestatus
Posted: Thu Mar 01, 2018 8:15 pm
by huyvinhptit
In the process of adding the plugin:
check_apachestatus.pl to monitor the Apache state of ip 192.168.10.181 on the picture. I have configured the parameters on the picture according to the forum guidelines and faulty:
$ARG1$ = -p 443 -t 30 -w 20 -c 10
UNKNOWN 500 Can't connect to 192.168.10.181:443 (connect: Connection refused)
$ARG1$ = -p 80 -t 30 -w 20 -c 10
Similarly, when you leave -p 80 still
UNKNOWN 404 error
If
$ARG1$ = -s -t 30 -w 20 -c 10 is the error then:
UNKNOWN
Loi1.JPG
Loi2.JPG
Loi3.JPG
If you have done anything about Nagios or have ever experienced this error, I hope to receive a share of fixes to the system to work normally.
Thank you very much !
Re: Error adding plugin check_apachestatus
Posted: Fri Mar 02, 2018 10:50 am
by bolson
From the command line of your Nagios XI server run the following and post the result:
And similarly:
Code: Select all
wget http://192.168.10.181
wget https://192.168.10.181
Re: Error adding plugin check_apachestatus
Posted: Sat Mar 03, 2018 12:16 am
by huyvinhptit
1.JPG
What I achieved is here. Hope you find the most effective way to fix it
Re: Error adding plugin check_apachestatus
Posted: Sun Mar 04, 2018 8:21 pm
by huyvinhptit
Can you help me !
Re: Error adding plugin check_apachestatus
Posted: Mon Mar 05, 2018 12:20 pm
by kyang
The server you are checking, does it allow port 443 for https?
Your nmap is not showing 443.
Here's mine which shows 443.
Code: Select all
[root@localhost libexec]# nmap 192.168.4.125
Starting Nmap 6.47 ( http://nmap.org ) at 2018-03-05 11:18 CST
Nmap scan report for 192.168.4.125
Host is up (0.0000040s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
3306/tcp open mysql
5666/tcp open nrpe
This is what I get when I run the check_apachestatus. (It works but throws unitialized errors.)
Code: Select all
[root@localhost libexec]# ./check_apachestatus.pl -H 192.168.4.125 -p 443
Use of uninitialized value $PosPreEnd in numeric le (<=) at ./check_apachestatus.pl line 166.
Use of uninitialized value $i in numeric le (<=) at ./check_apachestatus.pl line 166.
Use of uninitialized value $i in array element at ./check_apachestatus.pl line 167.
Use of uninitialized value $PosPreEnd in numeric le (<=) at ./check_apachestatus.pl line 166.
Use of uninitialized value $IdleWorkers in printf at ./check_apachestatus.pl line 185.
Use of uninitialized value $BusyWorkers in printf at ./check_apachestatus.pl line 185.
OK 0.029191 seconds response time. Idle 0, busy 0, open slots 1 | 0;0;0;0;0;3;2;3;0;2;1
Is check_http from our nagios-plugins package not an option for you?