We are currently providing monitoring services to several companies, this means a lot of time for each action we want to perform, I am in a process of automation, I have come to automate the deployment and configuration of VMs, updating sites, deployment of folders and hosts …
Now I would like to configure a host and service icon that can run a Python script so I can send a message to teams.
I know this is already integrated in the notifications but, this would give us problems by not having a review before sending the notification, also it is impossible for us because we have no connection on port 6555.
Is this possible or maybe I have gone a little crazy?
Not at all, we do that already
We have a custom icon that (currently) launches a PHP script that do some changes to the hostname and then re-directs the user to our CMDB,
You can place scripts in your web doc folder on the main server and just make a custom action with script.py?argument=$SERVICEDESC$ for example
Looks good!
I have more questions in relation to your answer,
I understand that the argument=X is to set the value of a variable in a function of that script.
the doc path you mention is ~/local/share/doc/check_mk?
how do I point to that path?
I have made a silly script that adds x text to a txt document and it reports that it does not find the path.
(Edit)
I have gone into the apache configuration to generate an alias to the aforementioned doc/check_mk path, it redirects me correctly but it is not executing the script.
In my case I am performing the following process,
I have created an HTML with JavaScript and a form, the checkmk environment variables I use to fill in the form since in my case the customer satellite site is named with the customer code and this helps the customer service team to generate the ticket, I add a reason field to enter a reason by hand and thus simplify the error message for the HD or systems team, with a submit send that data to a Python script that will send that data by mail to generate the ticket.
When I have it finished I will upload it to this thread in case it is useful.