CentOS errors

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.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS errors

Post by MPIvan »

Nagios was restart without errors but when i go to the page 192.168.1.17/nagios it opens but when i go to Host Groups or services or any other on the page i have the following error ....
Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

Check the Nagios log file for messages relating to startup or status data errors.
Always verify configuration options using the -v command-line option before starting or restarting Nagios!
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CentOS errors

Post by abrist »

Stop, kill, and restart nagios;

Code: Select all

service nagios stop
killall nagios
service nagios start
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS errors

Post by MPIvan »

Nothing change ... same error still showing when i go to services or host groups or others in the web interfaces ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CentOS errors

Post by abrist »

Could you post a large tail of the nagios log in code wraps?

Code: Select all

tail -50 /usr/local/nagios/var/nagios.log
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS errors

Post by MPIvan »

Here it is ....

Code: Select all

[root@mpnagios mibs]# tail -50 /usr/local/nagios/var/nagios.log
[1383606000] LOG ROTATION: DAILY
[1383606000] LOG VERSION: 2.0
[1383606000] CURRENT HOST STATE: Router001;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 8.89 ms
[1383606000] CURRENT HOST STATE: RouterCiscoT;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.64 ms
[1383606000] CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.05 ms
[1383606000] CURRENT SERVICE STATE: Router001;Ping;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 8.95 ms
[1383606000] CURRENT SERVICE STATE: RouterCiscoT;FastEthernet0/0;OK;HARD;1;OK: Interface FastEthernet0/0 (index 1) is up.
[1383606000] CURRENT SERVICE STATE: RouterCiscoT;FastEthernet0/1;OK;HARD;1;OK: Interface FastEthernet0/1 (index 2) is up.
[1383606000] CURRENT SERVICE STATE: RouterCiscoT;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.67 ms
[1383606000] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.00, 0.00, 0.00
[1383606000] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
[1383606000] CURRENT SERVICE STATE: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden - 5237 bytes in 0.001 second response time
[1383606000] CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.04 ms
[1383606000] CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 41978 MB (95% inode=98%):
[1383606000] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.3 (protocol 2.0)
[1383606000] CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 100% free (2943 MB out of 2943 MB)
[1383606000] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 71 processes with STATE = RSZDT
[1383608149] Auto-save of retention data completed successfully.
[1383611749] Auto-save of retention data completed successfully.
[1383615349] Auto-save of retention data completed successfully.
[1383618949] Auto-save of retention data completed successfully.
[1383622549] Auto-save of retention data completed successfully.
[1383626149] Auto-save of retention data completed successfully.
[1383629749] Auto-save of retention data completed successfully.
[1383633349] Auto-save of retention data completed successfully.
[1383636500] SERVICE ALERT: RouterCiscoT;PING;WARNING;SOFT;1;PING WARNING - Packet loss = 37%, RTA = 8.87 ms
[1383636557] SERVICE ALERT: RouterCiscoT;PING;OK;SOFT;2;PING OK - Packet loss = 0%, RTA = 0.65 ms
[1383636949] Auto-save of retention data completed successfully.
[1383640549] Auto-save of retention data completed successfully.
[1383644149] Auto-save of retention data completed successfully.
[1383647749] Auto-save of retention data completed successfully.
[1383651349] Auto-save of retention data completed successfully.
[1383654949] Auto-save of retention data completed successfully.
[1383658549] Auto-save of retention data completed successfully.
[1383662149] Auto-save of retention data completed successfully.
[1383665749] Auto-save of retention data completed successfully.
[1383669349] Auto-save of retention data completed successfully.
[1383669852] Caught SIGTERM, shutting down...
[1383669852] Successfully shutdown... (PID=2573)
[1383669852] Event broker module 'NERD' deinitialized successfully.
[root@mpnagios mibs]#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CentOS errors

Post by abrist »

So that log would suggest that nagios core is not running as the shutdown is the last few entries, not the subsequent startup . . .

Code: Select all

service nagios status
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS errors

Post by MPIvan »

.... i realy dont know what to do ... i have one solution ... becouse Nagios is on virtual machine and i have make snapshot of it ... i can go back few steps and start all over but the problem is when i installed i have not see any errors with the plugins and i dont have the check_snmp ... any how going back i think is not the solution ... :S
[root@mpnagios ~]# service nagios status
nagios is stopped
[root@mpnagios ~]#
I notes something in README file of the plugins
* Some plugins require that you have additional programs and/or
libraries installed on your system before they can be used. Plugins that
are dependent on other programs/libraries that are missing are usually not
compiled. Read the `REQUIREMENTS` file for more information.
.... i see that there is the check_snmp.c and .o and just check_snmp so way when i execute the commands as it say in "Installing Nagios Core From Source" documentation

Code: Select all

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
chkconfig --add nagios
chkconfig --level 35 nagios on
chkconfig --add httpd
chkconfig --level 35 httpd on
after that in libexec folder i dont have the check_snmp. So my question is here do i have to install some additional programs or what ? I didnt have this problem when i was installing Nagios on Ubuntu ... now im installing on CentOS so ... ???
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CentOS errors

Post by slansing »

Changing your distro will really have no impact on what a certain package may require you to install for another one to work. That being said, nagios must be running to use it.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS errors

Post by MPIvan »

Ok here is what iv done .... iv start all over ( snapshot menage ) iv follow the instruction "Installing Nagios Core From Source" and when i end of it with config make make all install etc... (./configure --with-nagios-user=nagios --with-nagios-group=nagios ;make ;make install ) i still cant see the "check_snmp" plugin ....Now im back (with snapshot menage) and im on the part before installing plugins .. all is done like except the part where the plugins should be installed... so can you pleas tell me what to do next how can i have this plugin up and running step by step ...
cbeattie
Posts: 19
Joined: Fri Oct 04, 2013 7:12 am

Re: CentOS errors

Post by cbeattie »

If you don't have the right packages for SNMP installed before you compile the plugins, check_snmp will get skipped.

Try:

Code: Select all

# yum install net-snmp-utils net-snmp-devel
The net-snmp package should get pulled in as a dependency for those, if it's not already installed. My notes are for CentOS 5, but if the package names might have changed slightly for CentOS 6, you may need to tweak them.

At any rate, the important one is net-snmp-devel, I think. Then try recompiling your plugins from source.
Locked