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.
Hi there i have installed nagios about a month ago i'm a new user/administrator of nagios .
S.O: CentOS release 6.5 (Final)
Nagios: Nagios® Core™ 4.0.2
Problem:
Nagios stopped monitoring/checking host and services and when i try to "Re-schedule the next check of this host" this shows:
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.
getenforce
/etc/init.d/nagios status
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ls -l /usr/local/nagios/var
ls -l /usr/local/nagios/var/rw
tail /usr/local/nagios/var/nagios.log
grep nag /etc/group
getenforce
/etc/init.d/nagios status
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
ls -l /usr/local/nagios/var
ls -l /usr/local/nagios/var/rw
tail /usr/local/nagios/var/nagios.log
grep nag /etc/group
Adjust paths as appropriate.
Installed from source?
I will do that tomorrow and will post result 17h50 gtm +0
i forgot to put the logs I remember they said something about an error on file stats/status "operation not permited"
the source i can't tell EXACTLY, bad memory sorry but i 'm almost certain its: http://pplware.sapo.pt/tutoriais/networ ... ao-nagios/
it is in my language, portuguese
about the first 3 questions yes green-field and... well because it was on tutorial /i 'm noob this is my first contact/work with servers and this is my first server
I can't read Portuguese, but I can see 1 thing outstanding - the dependencies prior to a source install aren't listed there. I'm not sure that's your problem, but maybe.
Also now wouldn't be a bad time to just start from scratch with 6.6 or maybe even 7.0, there is no reason to stick with 6.5. Likewise there are many good reasons to move on to Nagios core 4.0.8.
jdalrymple wrote:I can't read Portuguese, but I can see 1 thing outstanding - the dependencies prior to a source install aren't listed there. I'm not sure that's your problem, but maybe.
Also now wouldn't be a bad time to just start from scratch with 6.6 or maybe even 7.0, there is no reason to stick with 6.5. Likewise there are many good reasons to move on to Nagios core 4.0.8.
yes they are :
"Passo1) Como a versão usada do CentOS é uma versão minimal vamos ter de instalar a plataforma base (Apache + PHP) e as respectivas dependências necessárias para proceder à instalação do Nagios.
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.
[root@nagiosesjal ~]# setenforce 0
[root@nagiosesjal ~]# getenforce
Permissive
[root@nagiosesjal ~]# service nagios restart
A desligar o nagios: [ OK ]
A iniciar o nagios:
Can you now submit any commands from the UI? (basically, we are checking to see it selinux was getting in the way of stating the command pipe)
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.
abrist wrote:Can you now submit any commands from the UI? (basically, we are checking to see it selinux was getting in the way of stating the command pipe)
abrist wrote:Can you now submit any commands from the UI? (basically, we are checking to see it selinux was getting in the way of stating the command pipe)
i can submit commads i'm using putty
but in the web interface still the same with error on schedule check
[1435859139] wproc: early_timeout=0; exited_ok=1;
wait_status=32512; error_code=0;
[1435859139] wproc: stderr line 01: /bin/sh:
/bin/mail: No such file or directory
[1435859139] wproc: stderr line 02:
/usr/bin/printf: erro de escrita: Broken pipe
[1435859149] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpbSyMuu' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859149] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859159] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpvOCjgZ' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859159] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859168] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpRDsAe6' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859168] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859169] SERVICE NOTIFICATION: nagiosadmin;lptf-
PC;NSClient++ Version;CRITICAL;notify-service-by-
email;Connection refused
[1435859169] wproc: NOTIFY job 6 from worker Core
Worker 2489 is a non-check helper but exited with
return code 127
[1435859169] wproc: command: /usr/bin/printf "%b"
"***** Nagios *****\n\nNotification Type: PROBLEM\n
\nService: NSClient++ Version\nHost: My Windows
Server\nAddress: 192.168.1.1\nState: CRITICAL\n
\nDate/Time: Thu Jul 2 18:46:09 WEST 2015\n
\nAdditional Info:\n\nConnection refused\n" |
/bin/mail -s "** PROBLEM Service Alert: My Windows
Server/NSClient++ Version is CRITICAL **"
dinis.jose@gmail.com
[1435859169] wproc: host=lptf-PC; service=NSClient
++ Version; contact=nagiosadmin
[1435859169] wproc: early_timeout=0; exited_ok=1;
wait_status=32512; error_code=0;
[1435859169] wproc: stderr line 01: /bin/sh:
/bin/mail: No such file or directory
[1435859169] wproc: stderr line 02:
/usr/bin/printf: erro de escrita: Broken pipe
[1435859179] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpjHTBpP' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859179] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859189] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmp2mlqNa' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859189] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859199] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpKbVHn8' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859199] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859209] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmp0YWyaI' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859209] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859219] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpSxddaU' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859219] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859229] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpqDZhmI' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859229] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859230] SERVICE NOTIFICATION: nagiosadmin;lptf-
PC;Uptime;CRITICAL;notify-service-by-email;Connection
refused
[1435859230] wproc: NOTIFY job 8 from worker Core
Worker 2483 is a non-check helper but exited with
return code 127
[1435859230] wproc: command: /usr/bin/printf "%b"
"***** Nagios *****\n\nNotification Type: PROBLEM\n
\nService: Uptime\nHost: My Windows Server\nAddress:
192.168.1.1\nState: CRITICAL\n\nDate/Time: Thu Jul 2
18:47:10 WEST 2015\n\nAdditional Info:\n\nConnection
refused\n" | /bin/mail -s "** PROBLEM Service Alert:
My Windows Server/Uptime is CRITICAL **"
dinis.jose@gmail.com
[1435859230] wproc: host=lptf-PC; service=Uptime;
contact=nagiosadmin
[1435859230] wproc: early_timeout=0; exited_ok=1;
wait_status=32512; error_code=0;
[1435859230] wproc: stderr line 01: /bin/sh:
/bin/mail: No such file or directory
[1435859230] wproc: stderr line 02:
/usr/bin/printf: erro de escrita: Broken pipe
[1435859239] Error: Unable to rename file
'/usr/local/nagios/var/nagios.tmpNEJ1K8' to
'/usr/local/nagios/var/status.dat': Operation not
permitted
[1435859239] Error: Unable to update status data file
'/usr/local/nagios/var/status.dat': Operation not
permitted
after cleaning logs and restarting nagios this shows on logs: