shinken-monitoring / mod-webui

Shinken Web User Interface
GNU Affero General Public License v3.0
79 stars 71 forks source link

color metrics values #313

Closed ghost closed 9 years ago

ghost commented 9 years ago

If a check give a lot of metric, and for each metric, i give min and max and warning value, it's possible, in the metrics view, to color only the metric if is not in the good rang? because, if the check return just warning, all metrics is on orange. i think is more simple to see why the check return a warning or critical alert.

mohierf commented 9 years ago

Nice idea :+1:

maethor commented 9 years ago

@mohierf do you think this is possible?

mohierf commented 9 years ago

@maethor : quite easy ... I will have a look ;-)

mohierf commented 9 years ago

I did not made any modification in current version and I got this: image

Looking at the source code made me improve this feature (commit to come soon): image

maethor commented 9 years ago

When I developed this part, I remember having try this… but I can't remember why I didn't choose this option.

It's really nice. Thanks.

mohierf commented 9 years ago

I found and fixed several small bugs ... that made having always green state and 100% :/P

ghost commented 9 years ago

very nice, but, it's possible to have the same in service view? for example, i have a check return a lot of values like toto1_edge=716Req/S;1983;;650;3420 toto2_edge=616Req/S;1883;;450;2420 .... so if my check return 1 or other, all metrics of metrics view in service view is orange or other color. it's maybe complicated but is not possible if the metric is not in the range min/max, colorize only this metric?

mohierf commented 9 years ago

Currently it is not possible. Host and service element views are using the same code ...

maethor commented 9 years ago

I will take a look

mohierf commented 9 years ago

Color used in the progress bar is set depending upon the service state (https://github.com/shinken-monitoring/mod-webui/blob/bs3/module/perfdata_guess.py#L203).