Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Please follow this step-by-step guide:

  1. Copy the special agent to the local structure

    Code Block
    root@klappanas:/home/anastasios# cp /omd/sites/workshop/lib/python3/cmk/special_agents/agent_ibmsvc.py /omd/sites/workshop/local/share/check_mk/agents/special/


  2. 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 


  3. Make the script executable

    Code Block
    root@klappanas:/omd/sites/workshop/local/share/check_mk/agents/special# chmod +x agent_ibmsvc.py 


  4. Login as site user and add the following line to the end of the script

    Info

    su - workshop
    vi ~/local/share/check_mk/agents/special/agent_ibmsvc.py

    Code Block
    if __name__ == "__main__":
        main()




Info

https://realpython.com/python-main-function/#use-if-__name__-__main__-to-control-the-execution-of-your-code

Filter by label (Content by label)
showLabelsfalse
max5
spacesCON
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "special_agent" and type = "page" and space = "CON"
labelsspecial_agent

...

Page Properties
hiddentrue


Related issues