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

Feature: Worldmap line color flexibility #259

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

Conversation

vpithart
Copy link
Contributor

@vpithart vpithart commented Jun 3, 2020

What?

Line colors have been colored either statically (color, border) or by nagios-state (green=OK, yellow=warning, red=down). This PR adds flexibility to configure both coloring approaches together.
image

Why?

We need the map to serve both documentation and monitoring purposes.

How?

The line objects have a couple of new configuration options:

  • fixed_colors
  • line_color
  • line_color_border
  • stateful_outline
  • stateful_outline_width
  • stateful_outline_blur

Now, setting fixed_color=yes and stateful_outline=(any value except none) does the trick.

@vpithart vpithart changed the title WIP: Feature: Worldmap line color flexibility Feature: Worldmap line color flexibility Jun 3, 2020
@LarsMichelsen
Copy link
Contributor

The feature here also sounds good.

I'm asking myself some questions about it:

1.) At the moment we have two modes for coloring condition dependent lines: a) set the color depending on the status and b) set the color depending on the perfdata for weather map lines.

These are currently configured with the option line_type=....

With this new option we should consider how to switch this consistently.

Does it e.g. make sense to introduce another line_type here? Or does it limit it too much and we should rather add an option line_color_type, which then allows switching between "state", "weathermap", "fixed"?

2.) So far all line options have the prefix line_. So the new options should all have this prefix too.

3.) Should we then not make the border configurable analogous to the line color? e.g. with these options

line_outline=yes/no
line_outline_width=1
line_outline_blur=1
line_outline_color_type=state/weathermap/fixed
line_outline_fixed_color=#fff

@vpithart
Copy link
Contributor Author

Re (2) yes I do agree to name line_* them all.

Re (1) and (3) I haven't used weathermap-based colors so far thus I've ignored that feature at all.
Does this mean that types

        '13' => '---%---><---%---',
        '14' => '--%+BW-><-%+BW--',
        '15' => '---BW--><--BW---',

are those coloured by perfdata?

Then maybe only having stateful_outline=yes would mean that the outline is also coloured by perfdata.

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