Versions Compared

Key

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


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
colourGreen
titleLAST TESTED ON CHECKMK 2.
Please follow this step
3.0P1


Panel
borderColorblack
bgColor#f8f8f8
titleTable of Contents

Table of Contents

Step-by-step guide

...



  1. Log on via SSH and become the siteuser

    Code Block
    languagebash
    themeRDark
    root@linux# su mysite

    .

  2. Copy the special agent to the local structure

    root@klappanas:/home/anastasios# cp /omd/sites/workshop
    Code Block
    languagebash
    themeRDark
    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.

  3. Make the script executable

    root@klappanas:/omd/sites/workshop
    Code Block
    languagebash
    themeRDark
    OMD[mysite]~$:chmod +x ~/local/share/check_mk/agents/special# chmod +x agent_ibmsvc/special/<script>.py 
    Login as site user and add

    .

  4. Append the following line to the end of the script

    Infosu - workshop
    vi

    using Vim.

    Code Block
    languagebash
    themeRDark
    OMD[mysite]~$: vim ~/local/share/check_mk/agents/special/
    agent_ibmsvc
    <script>.py


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

...


  1. Tip

    For more information, study this python article.


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


Page Properties
hiddentrue


Related issues


...