Closed civodul999 closed 2 years ago
Hi @civodul999 !
I have tried to schedule a forced check by the web interface and it works , as you can see in the logs:
2022-01-06T12:34:01.602503+00:00 2bf6a8ff89ed : EXTERNAL COMMAND: SCHEDULE_FORCED_HOST_CHECK;localhost;1641472450
2022-01-06T12:34:12.192946+00:00 2bf6a8ff89ed : EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;Current Load;1641472459
I have used the linux/amd64
os variant of the manios/nagios:latest
image. Can you please provide me with the following information?
Image information
Can you please give us some information about the image you are using? In order to achieve this, please post here the output of the command:
docker inspect --format='{{range $k,$v := .Config.Labels}}{{printf "* %s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v}}{{end}}{{"\n"}}{{end}}' manios/nagios:[TAG]
Example output:
* build: 5
* gitCommit: c34e48cb6866b1a2bb77adf4d69feeab534ecc84
* homepage: https://www.nagios.com/
* maintainer: Christos Manios <maniopaido@gmail.com>
* nagiosPluginsVersion: 2.3.3
* nagiosVersion: 4.4.6
* name: Nagios
* nrpeVersion: 4.0.3
Image architecture
What is the architecture your docker image is using? You can easily find out by executing this
docker exec -it [container-name] /bin/sh -c 'apk --print-arch'
in your running container.
Example output:
amd64
Thanks, Christos
Hello, thank you for your help. Here the answers to your questions
1) on web interface, when I click on a service, then "Re-schedule the next check of this service", "commit". Next screen is the error.
2)
docker inspect --format='{{range $k,$v := .Config.Labels}}{{printf "* %s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v}}{{end}}{{"\n"}}{{end}}' manios/nagios:latest
* build: 8
* gitCommit: 69c1a3a190b865ecaf765c50c5b2dcb1042bb9e8
* homepage: https://www.nagios.com/
* maintainer: Christos Manios <maniopaido@gmail.com>
* nagiosPluginsVersion: 2.3.3
* nagiosVersion: 4.4.6
* name: Nagios
* nrpeVersion: 4.0.3
3)
docker exec -it nagios /bin/sh -c 'apk --print-arch'
aarch64
4) sorry, no relevant logs. When a force a check, nothing happens in nagios.log
Hi!
The docker image you use looks up to date. Since your architecture is aarch64
I suspect that you use a board like Raspberry Pi 4. Unfortunately I do not own one so I cannot test and reproduce the issue in this architecture. Maybe @DimmiDonger, @roe-ur-boat , @meanwhile28 can have a look too?
Last but not least can you try to create a forced check and send me the output of the following commands?
docker exec -it nagios /bin/sh -c 'cat /var/log/apache2/error.log'
and
docker exec -it nagios /bin/sh -c 'cat /var/log/apache2/access.log | egrep force'
Maybe these logs show something.
Thanks, Christos
yes, I'm using a raspberry pi 4.
for the commands, nothing relevant in the logs.
In access.log, I see the get and post request, but no error.
Hi @civodul999 ,
I am closing the issue due to inactivity. If you can share any steps to reproduce the issue, we can reopen it.
Thanks, Christos
Hello, can I re-open this? I have the problem on a regular xf86_64 system using the latest docker image
Apache log reports this
"POST /nagios/cgi-bin/cmd.cgi HTTP/1.0" 200 1614 "http://netmon.datactics.net/nagios/cgi-bin/cmd.cgi?cmd_typ=7&host=bavaria&service=PIT+Website+9255&force_check" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
while on the web-page, the user sees:
Error: Could not stat() command file '/opt/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.
[Return from whence you came](javascript:window.history.go(-2))
Note: nagios.cmd does not exist
Hi, I'm trying this nagios container, when I want to force a check through web interface, I have this error :
I read the differents issues, I have seen this one but, for me with the build manios/nagios:latest (nagios version 4.4.6), I have the error.
I don't have nagcmd group inside the container, I have nagios user and nagios group like the dockerfile.
The permissions are like this :
Is it a bug I can fix with some command or it should be fixed in a future release ?
Thank you for your help.