-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recheck not working on Thruk 3.12 #1013
Comments
Hm, I checked once more with pushing the recheck directly in the issue - the POST does not look very different to the one sent from Nagstamon: If we leave out token and referer, this just leaves the backend - could this be required? |
I checked some more and also ran a debug version of Nagstamon to find out more about this issue: First of all, the command issued by Nagstamon seems to be absolutely fine - manually executing the task using curl with the same CGI data is working as expected: Checking further on this error in the web led me to this page: And now executing the same command with an empty "Content-Type" header leads to an error on the web server: Setting the content type manually to the default from cron, everything works again: Unfortunately, I'm no programmer and don't know how to tell python to use this content type for the Recheck command. |
Took the line for IcingDBWeb Server and added it to the "Recheck" function of Thruk |
@tabbitsp thanks for your investigations - do you refer to Nagstamon 3.12 or 3.14? |
@HenriWahl - both Nagstamon 3.12 and 3.14 did not work - my reference was about Thruk 3.12, which is embedded into the current OMD package - it's a coincidence that they both have a similar version number ;-) |
Closing this as fix has been merged to daily of 3.15 |
* Update Thruk.py Fixing "Recheck" error for Thruk systems by adding the mandatory "Content-Type" header to fix #1013 * Update build-release-latest.yml --------- Co-authored-by: tabbitsp <[email protected]>
* Update Thruk.py Fixing "Recheck" error for Thruk systems by adding the mandatory "Content-Type" header to fix #1013 * Update build-release-latest.yml --------- Co-authored-by: tabbitsp <[email protected]>
* Centreon, 24.04, Fix ack on host (#1030) Tested on 24.04 unstable. All the others actions are working on this version. * 3.15 20240314 (#1033) * Update Thruk.py Fixing "Recheck" error for Thruk systems by adding the mandatory "Content-Type" header to fix #1013 * Update build-release-latest.yml --------- Co-authored-by: tabbitsp <[email protected]> * 3.15-20240420 * actions/checkout@v4 * actions/download-artifact@v4 * docker/login-action@v3 * actions/upload-artifact@v4 * name: ${{ github.job }} * actions/setup-python@v5 * actions/setup-python@v5 * actions/download-artifact ${{ github.job }} * artifact patterns * artifact patterns '' * added build-release-latest-test-artifacts.yml * no deps * no tests at all * path artifact * path artifact all distros * pattern: 'rhel*' * path: artifact --------- Co-authored-by: Benoit Poulet <[email protected]> Co-authored-by: tabbitsp <[email protected]>
Hi Nagstamon-Team,
I got an issue running "Recheck" with Nagstamon on our Naemon/Thruk-Server. Acknowledgement and Downtime work fine, as I deactivated the csrf for our IP addresses, but "Recheck" just won't do anything..
I ran the dumpio on our Apache and got the following POST info from Nagstamon to Thruk:
cmd_typ=7&cmd_mod=2&host=localhost&service=Check_Unknown&start_time=2024-03-05+15%3A51%3A00&force_check=on&btnSubmit=Commit
This results in an error:
[Tue Mar 05 15:51:05.398973 2024] [fcgid:warn] [pid 9497] [client myipaddress:60166] mod_fcgid: stderr: Can't locate object method "seek" via package "IO::Handle" at /usr/lib/thruk/perl5/Plack/Request.pm line 78.
The original POST from the server itself in the web looks like this:
cmd_typ=7&cmd_mod=2&start_time=1709650597&host=localhost&service=Check_Unknown&force_check=1&backend=328c5&referer=extinfo.cgi%3Ftype%3D2%26host%3Dlocalhost%26service%3DCheck_Unknown%26backend%3D328c5&CSRFtoken=1234567890_1
Is there anything which needs to be fixed from Nagstamon's side for this to work?
The text was updated successfully, but these errors were encountered: