Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility to default icinga2 graphite writer. #237

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tobiasstein
Copy link

Icinga2-graphite writer distinguishes between metrics
that are attached to a hosts and those that are attached to services.
This patch-set makes it easier to switch between graphite and grafana modules,
by making the graphite path ($hostname -> $type (host|services)) -> …) configurable
in icingaweb2-module-grafana. I did my best to not break existing installations,
all changes should be limited to the graphite datasource.
Defaults in icinga2-graphite writer should be sufficient to satisfy both modules.

Furthermore: clean up some code.

Please pull it in soon. Thanks.

* Bring opening curly braces in if-clauses to the same line.
* Break long lines with conditions along the logical operators (&&, ||).
* Break long lines along contitional operators.
* Fix identation of array
* Break long lines with array-definition around commas.
* Make graphite configuration compatible to defaults of icinga2 graphite
writer. But keep compatibility to existing installations.
 * Introduce a selector "Graphite graph type" with options:
* "auto" - alter graphite path if serviceName is instance of host or
services
  * "host" - force path 'host'
  * "services" - force path 'services'
* Introduce new DefaultPanelIds for a host and services if backend is
graphite
* Add defaults, helper functions for the new graphType and PanelIds
* Alter some function interfaces to include graphType.
* Add '&type=%s' to format strings
* Camel Case ImgController->getMyImageHtml()
* Remove empty lines
* Add some debug information
* Break long lines
* Add a panels that honor the graphType for automatic selection of
branches.
* Add hostalive4 panels that render the different metrics pl and rta.
@Mikesch-mp
Copy link
Owner

First thanks for helping making the module better.
But its not easy to see what are your changes and what are only formating changes.

Please make a PR without changing so much formating (phpStorm did a good job).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants