Automate command / datafields creation

Hello,

I’m searching a way to create commands (and associated datafields) on automated way.
I have several icinga environment, I search a way to create the same command on all of those environments without the GUI.
I read a lot of topic about it but no real solution found for the moment.
I read about configuration basket, api or powershell but nothing enough accurate…

Is someone already do those kind of thing and want to share method with me ?

Thanks for advance

Have a look at the tooling of the Linuxfabrik monitoring-plugins/CONTRIBUTING.rst at main · Linuxfabrik/monitoring-plugins · GitHub

I just test it but it’s not working, the folder / file “new-check” doesn’t exist in Linuxfabrik repository…

new-check is a place holder for a new check, you wrote.

Maybe have a look at https://github.com/Linuxfabrik/monitoring-plugins/blob/main/assets/icingaweb2-module-director/all-the-rest.json and see if you can inject your own stuff.

Also have a look at this monitoring-plugins/ICINGA.rst at main · Linuxfabrik/monitoring-plugins · GitHub for the usage of the result.

Sorry for the late reply, i was very busy.
I try your last link and it’s working very well.
I exported basket config from objects I previously create manualy, remove uuid with the linuxfabrik script and import json fater making some modifications.

Thanks for your help

1 Like