Working on developing a special agent plugin and would like to upload it for the community use.
It’s not a complex script but I’ve managed to get a working special agent with discovery.
Since I am new to git, github and development workflows in general I thought I’d ask before doing something silly.
I’ve created files as the omdsiteuser under the following folders:
Is it considered best practice to initialize the project from the ‘check_mk’ folder in the path above and ‘git add’ the files using the subfolder/path?
If I decide to work on another plugin later, will there be a conflict?
Or should I build out a special project folder and copy to the omdsiteuser for testing?
Hopefully this isn’t too silly of a question.
What everyone else said: Extensions should start their life as an MKP and might be included in Checkmk when a certain adoption rate is achieved.
There is an article on MKPs in the Official User Guide: Checkmk extension packages (MKPs) - Integrating extensions from the community into Checkmk
In the Checkmk exchange we added two stub MKPs (“Hello World” and “Hello Bakery”) to act solely as a template for own MKPs (the “Hello bakery” is to show bakery integration, not needed in your case). https://exchange.checkmk.com/
Thanks for all the replies and encouragement.
I fully intend (and have) create an MKP for the transfer and upload to the exchange.
My intent on this post was more along the lines of creating a repository on github and uploading the code in a file structure that makes sense and is appropriate. I’ve noticed that some exchange repositories are one folder with multiple plugins underneath, while others are individual plugins and they all mirror the folder structure of the OMD folders themselves.
It left me wondering if there are some tips, tricks or standard I’m not aware of and would regret doing something now with a little more experience.
Once again I appreciate the information and feedback.
Updating this as a follow up and to invite further feedback.
After working more on a custom special agent type check I settled on recreating the $OMD_ROOT folder structure. The special agent location includes a folder outside of the ~/local/share/check_mk structure. I felt it helpful demonstrate the actual path.
I did find that the local/lib/check_mk folder is a symbolic link which git chokes on if trying to deploy directly to the $OMD_ROOT.
My method is to clone down to a folder in the $OMD_ROOT<repofolder> and create symbolic links to represent the actual files. This seems to work fine with the exception that updating the agent_based script actively seemed to require an omd restart of the site for changes to take effect.
I truly appreciate your comments, assistance and links provided. Looking forward to working on more projects in the future. NOTE: CheckMK Exchange has posted v1.0.0 of the Cloudflare Status API checks but I just uploaded v1.0.2 so that should be forthcoming soon.