host monitoring?
Moderators: Developers, Moderators
host monitoring?
I would like to get up/down working for the hosts in my maps, but there isn't much in the manual yet for this. Has anyone got this working yet?
I ask here because I do not want to bother Howie since he is probably busy with more important things than answering my silly questions
I saw in the image dir that there are different symbols for up/down/recovering. Does that mean it would be possible to have different icons for host status, and still use different colors for the label (cpu load)?
edit: I found the answer to one of my questions in the manual. Seems you can use different icons for different values using the SET command. I also read about using up/down status, but I do not seem to understand how to use it....
/Carl
I ask here because I do not want to bother Howie since he is probably busy with more important things than answering my silly questions
I saw in the image dir that there are different symbols for up/down/recovering. Does that mean it would be possible to have different icons for host status, and still use different colors for the label (cpu load)?
edit: I found the answer to one of my questions in the manual. Seems you can use different icons for different values using the SET command. I also read about using up/down status, but I do not seem to understand how to use it....
/Carl
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: host monitoring?
The cactihost: datasource plugin sets a variable called 'state' for the node, which has the name of the state in it. It also returns a number as the actual "bandwidth" value, which is the cacti-internal state number.cwahlin wrote:I would like to get up/down working for the hosts in my maps, but there isn't much in the manual yet for this. Has anyone got this working yet?
I ask here because I do not want to bother Howie since he is probably busy with more important things than answering my silly questions
I saw in the image dir that there are different symbols for up/down/recovering. Does that mean it would be possible to have different icons for host status, and still use different colors for the label (cpu load)?
edit: I found the answer to one of my questions in the manual. Seems you can use different icons for different values using the SET command. I also read about using up/down status, but I do not seem to understand how to use it....
/Carl
So, for Cacti device 33 (the number in the URL on the host.php page)
Code: Select all
NODE mynode
LABEL my host name
LABELOFFSET S
TARGET cactihost:33
ICON images/nodestatus_{node:this:state}.png
That should do it. Let me know if it doesn't - this bit is not very well used so far. You're a pioneer
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!)
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!)
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
For those of us that are using custom graphics for our maps, wouldn't we have to create a custom status image for each graphic?
Like for mine, I'd have a MailStatus_up.png MailStatus_down.png MailStatus_disabled.png etc.
So my config line would look like:
ICON images/MailStatus_{node:this:state}.png
Am I correct in thinking this?
Like for mine, I'd have a MailStatus_up.png MailStatus_down.png MailStatus_disabled.png etc.
So my config line would look like:
ICON images/MailStatus_{node:this:state}.png
Am I correct in thinking this?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Yes, you would. The alternative is to use the numeric value, and an additional SCALE to change the colour of the label instead:streaker69 wrote:For those of us that are using custom graphics for our maps, wouldn't we have to create a custom status image for each graphic?
Like for mine, I'd have a MailStatus_up.png MailStatus_down.png MailStatus_disabled.png etc.
So my config line would look like:
ICON images/MailStatus_{node:this:state}.png
Am I correct in thinking this?
Code: Select all
SCALE cactiupdown 0 0.5 192 192 192
SCALE cactiupdown 0.5 1.5 255 0 0
SCALE cactiupdown 1.5 2.5 0 0 255
SCALE cactiupdown 2.5 3.5 0 255 0
NODE mynode
TARGET cactihost:33
USESCALE cactiupdown
LABEL my node
ICON images/myniceicon.png
LABELOFFSET S
That's just off the top of my head, but it should work. The MAXVALUE for a NODE is 100 by default, so the percentage usages should match the states ( (1/100) * 100 = 1).
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!)
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!)
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
I just did the scale test and it works, at least it turned the background of the label text to green. So I'm assuming that the rest of it will work. Very cool feature.Howie wrote:Yes, you would. The alternative is to use the numeric value, and an additional SCALE to change the colour of the label instead:streaker69 wrote:For those of us that are using custom graphics for our maps, wouldn't we have to create a custom status image for each graphic?
Like for mine, I'd have a MailStatus_up.png MailStatus_down.png MailStatus_disabled.png etc.
So my config line would look like:
ICON images/MailStatus_{node:this:state}.png
Am I correct in thinking this?
So the icon is the same, but the label will change colour with the state.Code: Select all
SCALE cactiupdown 0 0.5 192 192 192 SCALE cactiupdown 0.5 1.5 255 0 0 SCALE cactiupdown 1.5 2.5 0 0 255 SCALE cactiupdown 2.5 3.5 0 255 0 NODE mynode TARGET cactihost:33 USESCALE cactiupdown LABEL my node ICON images/myniceicon.png LABELOFFSET S
That's just off the top of my head, but it should work. The MAXVALUE for a NODE is 100 by default, so the percentage usages should match the states ( (1/100) * 100 = 1).
I'll work on custom graphics of my map later and let you know, I did one host already. Basically just putting a circle on each image and then changing the color of it based upon the status. So each graphic will end up with four different versions.
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
I have one set of images completed, but I don't think things are working as expected. Here's what I'm getting in my log file:
Doesn't seem to be returning the state, here is my config section:03/29/2007 09:47:05 AM - WEATHERMAP: Poller[0] ICON images/emailstatus_[UNKNOWN].png does not exist, or is not readable. Check path and permissions.
NODE node1170689558
LABEL MAIL
TARGET cactihost:31
ICON images/emailstatus_{node:this:state}.png
LABELOFFSET S
POSITION 334 550
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
It's the sort of thing that something like Imagemagick would probably help with. Maybe make some overlay images as transparent PNGs with check marks or crosses or whatever, then overlay them on the 'master' icon to make a new set. Mac OS X does something similar to this, for some stuff.streaker69 wrote: I'll work on custom graphics of my map later and let you know, I did one host already. Basically just putting a circle on each image and then changing the color of it based upon the status. So each graphic will end up with four different versions.
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!)
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!)
All I did was change the color of the images I was using. I use the cisco PNGs I found on this forum. grey for disabled, green/yellow/red for states.streaker69 wrote: I'll work on custom graphics of my map later and let you know, I did one host already. Basically just putting a circle on each image and then changing the color of it based upon the status. So each graphic will end up with four different versions.
/Carl
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
I'm doing pretty much the same thing, except I have different graphics for each server I monitor. It would appear though that for some reason, the State isn't being returned to weathermap. Not sure why.cwahlin wrote:All I did was change the color of the images I was using. I use the cisco PNGs I found on this forum. grey for disabled, green/yellow/red for states.streaker69 wrote: I'll work on custom graphics of my map later and let you know, I did one host already. Basically just putting a circle on each image and then changing the color of it based upon the status. So each graphic will end up with four different versions.
/Carl
Howie mentioned the Datasource plugin, which I believe was integrated into the Plugin Architecture, so I should be up to date on that.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Aaah. No. There's a plugin called Datasource?streaker69 wrote:Howie mentioned the Datasource plugin, which I believe was integrated into the Plugin Architecture, so I should be up to date on that.
Maybe I should rename some stuff in Weathermap then I meant the weathermap-cactihost-datasource-plugin - Weathermap has plugins itself now, to make adding new data types easier. One of those is the one that lets you query the state of cacti hosts. You need a 0.9preX release to use it.
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!)
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!)
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
Ahh, ok, so where do I get weathermap-cactihost-datasource-plugin? I don't see it in the .9Pre1 release I have currently installed, and it isn't listed under downloads on your page.Howie wrote:Aaah. No. There's a plugin called Datasource?streaker69 wrote:Howie mentioned the Datasource plugin, which I believe was integrated into the Plugin Architecture, so I should be up to date on that.
Maybe I should rename some stuff in Weathermap then I meant the weathermap-cactihost-datasource-plugin - Weathermap has plugins itself now, to make adding new data types easier. One of those is the one that lets you query the state of cacti hosts. You need a 0.9preX release to use it.
Edit: nevermind, found that it's there, but doesn't seem to be working?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
It should be in the lib/datasources/ directory... have I missed it off the packing list? You should havestreaker69 wrote:Ahh, ok, so where do I get weathermap-cactihost-datasource-plugin? I don't see it in the .9Pre1 release I have currently installed, and it isn't listed under downloads on your page.
./lib/datasources/WeatherMapDataSource_cactihost.php
It is loaded automatically, so any TARGET that begins cactihost: and then a number should just work for that host id.
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!)
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!)
- streaker69
- Cacti Pro User
- Posts: 712
- Joined: Mon Mar 27, 2006 10:35 am
- Location: Psychic Amish Network Administrator
For some reason, it's just not getting the node state. Tried it a couple different ways, it's just not getting it.Howie wrote:It should be in the lib/datasources/ directory... have I missed it off the packing list? You should havestreaker69 wrote:Ahh, ok, so where do I get weathermap-cactihost-datasource-plugin? I don't see it in the .9Pre1 release I have currently installed, and it isn't listed under downloads on your page.
./lib/datasources/WeatherMapDataSource_cactihost.php
It is loaded automatically, so any TARGET that begins cactihost: and then a number should just work for that host id.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Hmm. anything useful in the DEBUG log?streaker69 wrote:For some reason, it's just not getting the node state. Tried it a couple different ways, it's just not getting it.
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!)
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!)
Who is online
Users browsing this forum: No registered users and 1 guest