Check if everything on map is bellow 50%

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
imfv
Posts: 7
Joined: Wed Jan 25, 2012 11:04 am

Check if everything on map is bellow 50%

Post by imfv »

I´ve been trying with a co-worker to make what I can call as a "map resume"
We have at this momment five maps, but some are a little big.
So, someone asked if theres is possible to create a New Map and to make five circles, each one representing 1 map.

Each circle can stay with 3 collors, in a simple way:
Green: everything is under 50%
Yellow: one item of map is above 50%
Red: one item of map is above 75%

itens can be links, cpu % or memory utilization %.

I already tried to concatenate "TARGET´s", without success (I think that it´s adding colours from each target, my friend is betting on this solution for now). I´ve checked some operations with TARGETs.

Code: Select all

TARGET gauge:E:/Apache2/htdocs/cacti/rra/69/380.rrd:hrProcessorLoad:- gauge:E:/Apache2/htdocs/cacti/rra/67/379.rrd:hrProcessorLoad:-
If we put 2 or more targets on same node, it will get last TARGET. Did it just to make sure.

Code: Select all

TARGET gauge:E:/Apache2/htdocs/cacti/rra/69/380.rrd:hrProcessorLoad:-
TARGET gauge:E:/Apache2/htdocs/cacti/rra/67/379.rrd:hrProcessorLoad:-
My next try will be read poller_output_table and check the values. I was thinking to use some of thold process to make it, but i´m still trying to understand codes.

I checked some posts at forum and didn´t find anything that could give me another idea.
Anyone has doing something like that before or have another option to make it?

Thanks
"If I have seen further it is by standing on the shoulders of Giants." Isaac Newton
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Check if everything on map is bellow 50%

Post by Howie »

I wrote some code for this a while ago.

Currently (as in, while I sit here :-) ) , I'm focused on getting 0.97b out, which is mostly bugfixes, and then I'll start adding back in the things that were planned for 0.98. This one is pretty quick though.

What I had was:

Code: Select all

ADDED - new DATAOUTPUTFILE allows collected data to be written to a file for later use (automatically on in Cacti)
ADDED - new wmdata: datasource plugin can read data from files produced by DATAOUTPUTFILE
So the idea is that you can refer to data collected in another map. It could easily include average, total, min, max for all data sources.

HOWEVER, for what you are doing at the moment - it will add the results together for all those targets. If you set the BANDWIDTH to be the total of all the BANDWIDTHs, then you nearly get what you want.

For that specific statement "everything is under 50%" and "one item is above x%" you would need the maximum percentage, calculated from values read from any target.

I'll make sure this is possible in the first 0.98 version since it's nearly all ready.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
imfv
Posts: 7
Joined: Wed Jan 25, 2012 11:04 am

Re: Check if everything on map is bellow 50%

Post by imfv »

Thanks for the answer.

We got something the colors are changing but isn´t good as we want. I was working on it with a friend. I just came back from vacation and he is now on vacation. Now I´m thinking on a way to make it more accurate like separating the tiers.

Thanks for the tips.
"If I have seen further it is by standing on the shoulders of Giants." Isaac Newton
imfv
Posts: 7
Joined: Wed Jan 25, 2012 11:04 am

Re: Check if everything on map is bellow 50%

Post by imfv »

My colleague made a workaround to do it. For now it only check if CPU % are 0-50, 50-75 or 75-100% putting the collor green, yellow and red. Here are the resume of steps:

1) Build a script to get all rrdupdate from selected .rra´s
2) put it all in a file
3) Ordenate and classify the numbers - higher on top.
4) Add the bigger number on another rra. We need 1 rra to each map.
5) On weathermap, read this new rra and use scale defined with pictures (we used default circle images)

Result, we have 3 circles that points to 1 map each one. If this circle changes collor (to green or yellow) we know that a equipament have a problem.

The problem we had was since we used localhost to apply the scripts, our circles were 1 poller late (because of host ID). We generated another "localhost" and it worked good.
"If I have seen further it is by standing on the shoulders of Giants." Isaac Newton
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest