Unable to get process status/Could not read program status

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
C.Appl
Posts: 14
Joined: Wed Feb 26, 2020 8:03 am

Unable to get process status/Could not read program status

Post by C.Appl »

Hi everyone,

I have a really big problem and I hope someone can help me quickly.
First of all, I use a raspberrypi with raspbian and nagios core, with the lastest version.

I tried to fix a problem with a dht22 sensor, because a service to check the temperature and return code of 13.
The service was out of bounds.. so i guessed its a problem with the permissions.

So i tried to change the permissions and to give the right ones for the service.

Now i think, because of trying to fix that problem, i crashed my nagios or something else.
The webinterface of nagios core is unable to get process status.
For the hosts, there is an Error: Could not read host and service status information!
And in the current event log: Warning: Could not read program status information!

BUT.. if i run
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
it says: Things look okay - No serious problems were detected during the pre-flight check

and when i run
systemctl status nagios.service
i got several errors.. i took a screenshot of this output.

So can someone tell me, what i have to do?
Do i have just to set some more permissions?
I don't have any ideas and I'm desperate, because Iam new to nagios..

Thanks all!
Attachments
current event log
current event log
Output file
Output file
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unable to get process status/Could not read program stat

Post by Box293 »

I would review the steps here in the following documentation and repeat any step that is permission related.

https://support.nagios.com/kb/article.p ... 6#Raspbian
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
C.Appl
Posts: 14
Joined: Wed Feb 26, 2020 8:03 am

Re: Unable to get process status/Could not read program stat

Post by C.Appl »

I checked all the steps for Raspbian, but it hasn't changed anything. I got still the same error. :(
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to get process status/Could not read program stat

Post by lmiltchev »

Can you run the following commands and show the output?

Code: Select all

ls -lad /usr/local/nagios
ls -lad /usr/local/nagios/var
ls -lad /usr/local/nagios/var/rw
ls -la /usr/local/nagios/var/rw
Be sure to check out our Knowledgebase for helpful articles and solutions!
C.Appl
Posts: 14
Joined: Wed Feb 26, 2020 8:03 am

Re: Unable to get process status/Could not read program stat

Post by C.Appl »

Yes sure, here is the output.
Attachments
Output
Output
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to get process status/Could not read program stat

Post by lmiltchev »

Run the following commands to change the permissions of the nagios and var folders to nagios:

Code: Select all

chmod nagios.nagios /usr/local/nagios
chmod nagios.nagios /usr/local/nagios/var
and restart nagios to see if the issue has been fixed.

Do you have a nagcmd group on your system or just nagios? Can you run the following command and show the output?

Code: Select all

grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
C.Appl
Posts: 14
Joined: Wed Feb 26, 2020 8:03 am

Re: Unable to get process status/Could not read program stat

Post by C.Appl »

I try to run the following commands in the commandline, then i get the message:
"chmod: invalid mode: 'nagios.nagios'"

Or do i have to run the command in the directory?
because then i got the message, that is a missing operand after nagios.nagios

Sorry, if it's a stupid questions, but Iam new to this..
Don't i have to write chmod 777 for example?


And i have just the nagios group
My Output is: nagios:x:995:www-data
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to get process status/Could not read program stat

Post by lmiltchev »

Oh, my bad. I am sorry! I meant "chown"... :oops:

Code: Select all

chown nagios.nagios /usr/local/nagios
chown nagios.nagios /usr/local/nagios/var
I must be Friday... :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
C.Appl
Posts: 14
Joined: Wed Feb 26, 2020 8:03 am

Re: Unable to get process status/Could not read program stat

Post by C.Appl »

Oh my god, it works!! You saved me, haha. Thank you so much! :D :D
It may just be a little thing for you, but iam so happy now. You really deserver your weekend now, haha.
_____________________________________________________________________________________________
Can i ask you something else or do i have to make a new post for this?
Because before i had this issue, i tried to fix another problem.
I want to check the humidity and temperature of a room with a dht22 sensor.
Also I installed the nessecary plugins wiringPi and lol_dht22. So i can check the Humidity/Temperature in the commandline.
But i want so see the stats in the webinterface, so i also create a humidity.sh and temerature.sh with the query in usr/lib/nagios/plugins and the commands in /etc/nagios/nrpe.cfg. I followed a manual.
At least i assigned the query to the device.

I have following error:
(Return code of 13 for service 'Temperatur' on host 'raspberrypi' was out of bounds)

Can you help me here too?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to get process status/Could not read program stat

Post by lmiltchev »

Oh my god, it works!! You saved me, haha. Thank you so much! :D :D
It may just be a little thing for you, but iam so happy now. You really deserver your weekend now, haha.
I am glad I was able to help! :)

I will be closing this topic now.
_____________________________________________________________________________________________
Can i ask you something else or do i have to make a new post for this?
Because before i had this issue, i tried to fix another problem.
I want to check the humidity and temperature of a room with a dht22 sensor.
Also I installed the nessecary plugins wiringPi and lol_dht22. So i can check the Humidity/Temperature in the commandline.
But i want so see the stats in the webinterface, so i also create a humidity.sh and temerature.sh with the query in usr/lib/nagios/plugins and the commands in /etc/nagios/nrpe.cfg. I followed a manual.
At least i assigned the query to the device.

I have following error:
(Return code of 13 for service 'Temperatur' on host 'raspberrypi' was out of bounds)

Can you help me here too?
Please start a new thread. This way, we will keep things organized. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked