|
|
| Author |
Message |
gustavhelgi
Joined: 13 Nov 2008 Posts: 11
|
Posted: Tue Nov 18, 2008 6:43 am Post subject: One node to check other nodes? |
|
|
Hi,
Has anyone tought about the possibility of one node checking the status of other nodes ?
What i mean is that one node could cover like 4 nodes. Where the 4 nodes are checking up/down (or ping or Latency). And if any of them report error (go red) the one node would like go yellow indicating that one or more of the 4 nodes have a problem ?.
As a side node, what about interaction between maps? Like in my case i have layers...Global Network down to country down to DataCenters...So that if i had a node for example named U.K in the Global map that would turn yellow if any node in the U.K map would report error.
Just throwing it out there .
Regards,
Gustav |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Tue Nov 18, 2008 7:29 am Post subject: Re: One node to check other nodes? |
|
|
| gustavhelgi wrote: | Hi,
Has anyone tought about the possibility of one node checking the status of other nodes ?
What i mean is that one node could cover like 4 nodes. Where the 4 nodes are checking up/down (or ping or Latency). And if any of them report error (go red) the one node would like go yellow indicating that one or more of the 4 nodes have a problem ?.
As a side node, what about interaction between maps? Like in my case i have layers...Global Network down to country down to DataCenters...So that if i had a node for example named U.K in the Global map that would turn yellow if any node in the U.K map would report error.
Just throwing it out there .
Regards,
Gustav |
Second one you can do. Just set the INFOURL to the Cacti URL for that map - easy:
| Code: |
INFOURL /cacti/plugins/weathermap/weathermap-cacti-plugin.php?action=viewmap&id=547646a598108729d32e
|
The first one - aggregating data from multiple nodes is a bit trickier. You could do it by some duplication. On the 'master' node, you list all the targets of the other nodes, and then use a special scale and maxvalue so that where the total isn't what you expect, you get the colour you want....
| Code: |
NODE summary
TARGET cactihost:22 cactihost:23 cactihost:24 cactihost:25
USESCALE aggregate_host
|
so now, if all 4 nodes are up, the value would be 12 (4*3, where 3=up).
So you can make a scale which is green when it's 12, yellow when it's 10 or 11 (one or two down) and red below that.
| Code: |
SCALE aggregate_host 0 9 255 0 0
SCALE aggregate_host 10 11 255 255 0
SCALE aggregate_host 12 12 0 255 0
|
This is taking advantage of the fact that maxvalue defaults to 100 for nodes, so even though the scale is in percentages, there's a 1:1 mapping the the values. If you wanted to do this with different groups, it'd be best to set MAXVALUE to 12 (or whatever for the number of nodes) and then have a scale where 100% is green, 80-100 is yellow and <80 is red. That way you can re-use the scale for multiple 'master' nodes with different numbers of children.
Make sense? |
|
| Back to top |
|
 |
gustavhelgi
Joined: 13 Nov 2008 Posts: 11
|
Posted: Tue Nov 18, 2008 7:43 am Post subject: |
|
|
Hi Howie and thanx for a quick reply.
For the second one it was more in the line of the first one. That is could a node in one map check the status of all other nodes in another map. Maby i misunderstood your answer ?
Thats a brilliant solution if you have cacti...then i just wonder could you do this without cacti ?  |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Tue Nov 18, 2008 8:26 am Post subject: |
|
|
| gustavhelgi wrote: | Hi Howie and thanx for a quick reply.
For the second one it was more in the line of the first one. That is could a node in one map check the status of all other nodes in another map. Maby i misunderstood your answer ?
Thats a brilliant solution if you have cacti...then i just wonder could you do this without cacti ?  |
Well, how are you checking status in the first place? The same thing can be applied to other sources... the problems with a 'everything on that other map' reference are:
1) each map is run in isolation, they don't have any context about the other maps, so it would need to save some state somewhere.
2) often it isn't really *all* nodes, but "all nodes apart from those" or "all servers" or something. With templates in 0.96 it could be 'all nodes that inherit from the server template' I guess. Trouble is, weathermap would have to know in advance that it needed to save that information somewhere. |
|
| Back to top |
|
 |
gustavhelgi
Joined: 13 Nov 2008 Posts: 11
|
Posted: Tue Nov 18, 2008 9:31 am Post subject: |
|
|
Yeah exactly .
I've just been thinking about it because it would be cool that from the top view you could see Yellow in those location where problem is and then from there go deeper into the network to find where the problem is located . |
|
| Back to top |
|
 |
|