After some time I went back into the topic to create own icingaweb2 modules. Since my last look into this, the Icinga php library with the sub-modules ipl-html, ipl-sql etc. is released.
I know the Training, the slides from OSMC-talk from 2017, the 2017’ blog post from Netways as well the blog post from 2020 on icinga.com. On the last one we can read the announcment of a developer guide. Are there any news about this? Or is this still the training?
If I would have a free wish, it would be great if it’s like the dev. guide like for Icinga for Windows from @cstein . Because this helped me a lot to understand the framework to build own checks. As well if I had to debug the framework/checks, if something was not working like excpected after the upgrade and and create issue on GitHub afterwards
The dev. guide for icinga is also very extensive
Now I try to understand the framework to build own modules. For this I analyse the source of some modules like mentioned in the blog post on icinga.com. e.g. director, grafana, business processes. But it’s pretty hard to understand the code without comments (why there aren’t any commets what the function is doing? I know it’s not every programmers thing to document something ) as well if the code is also very extensive. And reading every file it’s like getting old very fast It’s also like: where to start? The structure like mentioned in the training helps a little bit.
What I want to do is for example:
- accessing data sources configured in icingaweb (configuration → application → ressources) .
- I also want to access APIs from other programs, websites etc and combine the data with the data from icinga
- etc. etc.
For this I’m missing examples. e.g. if the framework offers some “special” objects to use in the own code. As well would be interesting if there are some base functions we could use, so as not to have to reinvent every wheel.
And also can/should we use the function from IPL for our modules by now or should we use the “old way” like mentioned in the training. As well the PDO functions of PHP. While looking in some other modules, I saw not everybody is still using the new IPL.
Every hint, every example, link to a code (on GitHub) etc. would be very helpful to make life a little easier . Especially if we probably have to wait longer for the dev guide.