Info |
---|
It may be necessary to modify a special agent shipped with |
...
Checkmk. Please don't modify the original files. You will lose any modifications after an upgrade. |
Status | ||||
---|---|---|---|---|
|
|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Step-by-step guide
...
Log on via SSH and become the siteuser
Code Block language bash theme RDark root@linux# su mysite
.
Copy the special agent to the local structure
root@klappanas:/home/anastasios# cp /omd/sites/workshopCode Block language bash theme RDark OMD[mysite]~$:cp ~/lib/python3/cmk/special_agents/agent_ibmsvc<script>.py /omd/sites/workshop~/local/share/check_mk/agents/special/
Change the permissions of the file to the site user
Code Block root@klappanas:/home/anastasios# cd /omd/sites/workshop/local/share/check_mk/agents/special root@klappanas:/omd/sites/workshop/local/share/check_mk/agents/special# chown workshop. agent_ibmsvc.py
.
Please be aware that in order for the custom special agent to be executed by Checkmk instead of the default one, it needs to have the same name as the default special agent.Make the script executable
Login as site user and add root@klappanas:/omd/sites/workshopCode Block language bash theme RDark OMD[mysite]~$:chmod +x ~/local/share/check_mk/agents/special# chmod +x agent_ibmsvc/special/<script>.py
.
Append the following line to the end of the script
su - workshopInfo
viusing Vim.
Code Block language bash theme RDark OMD[mysite]~$: vim ~/local/share/check_mk/agents/special/
agent_ibmsvc<script>.py
Code Block language bash theme RDark if __name__ == "__main__": main()
...
Tip For more information, study this python article.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page Properties | ||
---|---|---|
| ||
|
...