I’m trying to get my plugin working on CheckMk 2.3p1 and I’m struggling getting a secret to my special agent. I’m using the Redfish plugin as reference, but still cannot figure out this:
In the “server_side_calls” file it prepares the command line for the execution of the special agent:
This Secret object is passed as string as a command line parameter:
So I actually have no idea where to take the “path” value from, that the password store lookup needs.
I then found the “unsafe” method of the Secret class. I would prefer to have the “server_side_call” looking up the password and give it to the special agent. This should do what I want:
I would appreciate a little hint on how to get the password to my special agent. I would prefer not to modify the special agent, I’d like the server_side_call to retrieve the password and hand it plaintext as parameter to the special agent.
I was actually trying to retrieve the password in the server_side_call script, so I don’t have to modify my special agent and make it dependant on the CheckMk libs.
Now I got it. When using the unsafe() method on the Secret within the server_side_call, it later gets replaced by the plaintext password that is then given to the special agent: