Icingadb-web for MAP module#133
Open
gbin2265 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem I’m still facing is that it takes a very long time to get results because of the large number of service objects that need to be processed. At the moment, I have 8k hosts and 280k services.
I also wanted to give the MAP module a bit more of the look and feel of icingadb-web.
I created a new objectType called ‘icingadb’
?objectType=icingadbwebThis will return one SQL result per host, similar to how it currently works for hostgroups in icingadb-web.
So instead of 280k + 8k SQL rows, I only get 8k of rows.
Now, when you click on a marker, you get this as a result:
Just like it is now in icingadb-web, when you click on one of the icons you get the corresponding list.
I also adjusted the symbol according to the status.
No problem → host symbol, color green
Host in error → host symbol, color red
Host in downtime or acknowledged → host symbol with plug or check, color light red
Host without problems but with a service problem → service symbol, color based on the worst status (red, orange, purple, blue)
To also provide the option of setting the map in icingadb mode, I added a setting in the config.ini:
objectType = "icingadbweb" (opties all, host , service or icingadbweb)This way, you can set it as default to work with the new look.
Would this be something to consider integrating into the MAP module?
As I always say, I’m not a PHP developer.
If someone can improve or optimize the code, that is always welcome.