Modify attributes with cmd.cgi and curl

(noone123) #1

i am trying to disable/enable active_checks of a service and facing two problems.
Auth is done via htpasswd.
Thruk latest version (debian jessie)
Naemon-core 1.03

  1. i found the curl command to enable and disable active checks of a service.
    But the command only works if i POST the token.
    As the token changes frequently, my question is:
    Is there a way to commit command using cmd.cgi without sending the token?

  2. I was not able to reset the modified attribute via Thruk ui and via curl.
    After using “Reset Modified Attributes” in the right panel of thruk,
    i still see active checks enabled as modified attribute in the service overview.
    Is there any known problem with this? Else i have to debug :wink:

Thx for your help!!

(Sven Nierlein) #2
  1. which versions are you using? If there are only a few hosts which need to send such curl requests, you could add them to the csrf_allowed_hosts (
  2. Resetted modified attributes take effect after reloading/restarting the core and not immediatly.

(noone123) #3


thx for your answer.
Curl version is at least: 7.38.0
Thruk is version 20.2-2
Os is Debian Jessie (latest)
Naemon and naemon livestatus is 1.03

Unfortunately there are to many hosts… 5-6k i might send this command to.
I wanted to prevent opening the livestatus-socket or using ssh to send those commands.
Do you see any option ?
Of curse i can curl for the token in the first place but this is quiet some overhead.

(Sven Nierlein) #4

well, wildcards are allowed for the csrf_allowed_hosts option, so you can simply disable it completly and don’t have to send a token at all.

(noone123) #5

that might help. Thx a lot :wink: