[rhel6.5] several errors in nagios configuration

  • 1. Click on the topology map and no graphics information will appear. This error is caused by the lack of GD devel installation treasure;
[root@server20 nagios-cn-3.2.3]# yum install /mnt/nagios/gd-devel-2.0.35-11.el6.x86_64.rpm -y
  • 403 error occurred when using command to detect httpd service status, which is caused by the requested page does not exist
[root@server20 nagios]# ./libexec/check_http -H -p 80
HTTP WARNING: HTTP/1.1 403 Forbidden - 4184 bytes in 0.000 second response time |time=0.000434s;;;0.000000 size=4184B;;;0
  • You need to create a default software release directory
[root@server20 nagios]# touch /var/www/html/index.html
[root@server20 nagios]# chown apache.apache /var/www/html/index.html
[root@server20 nagios]# ./libexec/check_http -H -p 80
HTTP OK: HTTP/1.1 200 OK - 266 bytes in 0.001 second response time |time=0.000536s;;;0.000000 size=266B;;;0
  • Start the service httpd,nagios after nagios is configured, use the browser to access, and prompt that URL/nagios does not exist
  • Most of this is because apache users do not have access to the nagios directory
[root@server20 nagios]# id apache
uid=48(apache) gid=48(apache) groups=48(apache)
[root@server20 nagios]# usermod -G nagios apache
  • There's also a question of no ending
[root@server20 nagios]# ./libexec/check_ping  -H -w 100,20% -c 200,50% -p 5 
CRITICAL - Could not interpret output from ping command
  • The prompt does not explain the output from the ping command. The check ping command is provided by the Nagios plugins plug-in. The options for compiling the plug-in are as follows
(reverse-i-search)`./co': ./configure --with-nagios-user=nagios --enable-extra-opts --enable-libtap --enable-perl-modules --with-cgiurl --with-perl  --with-ping-command=/bin/ping   --with-trusted-path --with-nagios-group=nagios 
  • There is a prompt on the Internet that it is because -- with ping command = / bin / Ping is not specified. After I specify this option and recompile and install it again, the error still exists;
  • There's another way of saying that it's because of the problem of authority, execution
chmod u+s /bin/ping
  • To solve this problem, instead, remove the compile option -- with ping command = / bin / Ping. The software used here is nagios-plugins-2.1.1.tar.gz
  • Here are my compilation options
[root@server20 nagios-plugins-2.1.1]# ./configure --with-nagios-user=nagios --enable-extra-opts --enable-libtap --enable-perl-modules --with-cgiurl --with-perl   --with-trusted-path --with-nagios-group=nagios 
  • The problem is solved
[root@server20 libexec]# ./check_ping  -H -w 100,20% -c 200,50% -p 5 
PING OK - Packet loss = 0%, RTA = 0.31 ms|rta=0.310000ms;100.000000;200.000000;0.000000 pl=0%;20;50;0

  • Browser access shows that ping status is normal

Keywords: Apache yum RPM

Added by jimrains on Fri, 03 Apr 2020 01:51:46 +0300