0

I have the latest version of thruk installed with naemon and livestatus. I want to be able to post commands from a python script to cmd.cgi from the same server without the interference of authentication. I have tried the settings of:

use_authentication=0 default_user_name=thrukadmin

but it doesn't seem to work in the thruk gui. When trying to post to the cgi from the thruk gui I get the error, "I'm sorry Dave......"

Any thoughts on why this not working right? The apache server on that system uses ldap to authenticate to the gui, could this be an issue?

Other thoughts?

1 Answers1

0

It's much easier, you don't even need Thruk in the middle. You can simply write to Naemons command_file.

The external command list at https://www.naemon.org/documentation/developer/externalcommands/ contains an example for every possible command.

Here is a shell snippet which schedules a host downtime:

printf "[%lu] SCHEDULE_HOST_DOWNTIME;host1;1478648441;1478638441;1;0;3600;naemonadmin;This is an example comment.\n" `date +%s` > /var/lib/naemon/naemon.cmd

When using Thruk, you can use thruks cli script to send commands:

thruk r -d comment_data=test  /hosts/localhost/cmd/schedule_host_downtime

Authentication is only required if you want to send commands by HTTP.

sni
  • 125
  • 6