host monitoring?

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
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.
Hmm. anything useful in the DEBUG log?
Here's the excerpt from the debug for the node I'm working with.
ReadData for NODE node1144211361:
03/29/2007 11:32:22 AM - WEATHERMAP: Poller[0] ReadData: New Target: cactihost:7
03/29/2007 11:32:22 AM - WEATHERMAP: Poller[0] ReadData: Matched for WeatherMapDataSource_cactihost. Calling WeatherMapDataSource_cactihost->ReadData()
03/29/2007 11:32:22 AM - WEATHERMAP: Poller[0] CactiHost ReadData: Returning (3,3,0)
03/29/2007 11:32:22 AM - WEATHERMAP: Poller[0] ReadData: Setting 3,3
03/29/2007 11:32:22 AM - WEATHERMAP: Poller[0]
And then further down in the debug:
03/29/2007 11:32:23 AM - WEATHERMAP: Poller[0] ICON images/emailstatus_[UNKNOWN].png does not exist, or is not readable. Check path and permissions.
I keep getting the [UKNOWN] wherever I put the {node:this:state}. I found you can put that on the label line as well, just as a quick debug to see what value it's getting and it always comes up as [UNKNOWN].
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote: I keep getting the [UKNOWN] wherever I put the {node:this:state}. I found you can put that on the label line as well, just as a quick debug to see what value it's getting and it always comes up as [UNKNOWN].
And if you put {node:this:bandwidth_in} in your label? You should get 3...
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!)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
streaker69 wrote: I keep getting the [UKNOWN] wherever I put the {node:this:state}. I found you can put that on the label line as well, just as a quick debug to see what value it's getting and it always comes up as [UNKNOWN].
And if you put {node:this:bandwidth_in} in your label? You should get 3...
Yes, I did, so that part works.

Ok, after reading through your source for WeatherMapPlugin_cactihost.php, I think the problem is in there. But I'm kind of fumbling through it because I really don't php that well.

I'll show you what I've changed, which does return a value, but I'm still getting [UNKNOWN].

Code: Select all

                $inbw = $state;
                $outbw = $state;
                $item->add_note("state",$statename);
            }
        }
 
        debug ("CactiHost ReadData: Returning ($inbw,$outbw,$state)\n");
 
        return( array($inbw, $outbw, $state));
    }
}
You did have $date_time where I now have $state. If I put $statename there then the debug does show 'up' for the status, but it isn't outputing that with the {node:this:state}.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote: You did have $date_time where I now have $state. If I put $statename there then the debug does show 'up' for the status, but it isn't outputing that with the {node:this:state}.
No, that last return value should be $date_time... all the plugins return the 'age' of their data, so that it can be displayed in the map by some non-existent-yet part. The theory was that if your collector has died, you want that to show somehow in the map, so you aren't happily looking at 3 hour old data while your datacentre is on fire. This is what the post-processing plugins were intended for, although I haven't really crystalised how that should work yet.

Are you using PHP4 by any chance?

For the moment, the obvious fix is to use bandwidth_in instead of state, and put the numbers in your filenames instead of the names, but that doesn't fix the add_note() stuff.
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!)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
streaker69 wrote: You did have $date_time where I now have $state. If I put $statename there then the debug does show 'up' for the status, but it isn't outputing that with the {node:this:state}.
No, that last return value should be $date_time... all the plugins return the 'age' of their data, so that it can be displayed in the map by some non-existent-yet part. The theory was that if your collector has died, you want that to show somehow in the map, so you aren't happily looking at 3 hour old data while your datacentre is on fire. This is what the post-processing plugins were intended for, although I haven't really crystalised how that should work yet.

Are you using PHP4 by any chance?

For the moment, the obvious fix is to use bandwidth_in instead of state, and put the numbers in your filenames instead of the names, but that doesn't fix the add_note() stuff.
I'll put the $date_time back in. And I just did exactly what you said before you posted this and it's working. Apparently the StateName portion isn't working right. I am using PHP 4.3.9. I'm ok using the numeric values, easy enough to do.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote:I'll put the $date_time back in. And I just did exactly what you said before you posted this and it's working. Apparently the StateName portion isn't working right. I am using PHP 4.3.9. I'm ok using the numeric values, easy enough to do.
OK. Then it's a PHP4 vs PHP5 problem. I wish PHP4 would die quickly. :evil:

It'll be fixed in the next version.
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!)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Howie wrote:
streaker69 wrote:I'll put the $date_time back in. And I just did exactly what you said before you posted this and it's working. Apparently the StateName portion isn't working right. I am using PHP 4.3.9. I'm ok using the numeric values, easy enough to do.
OK. Then it's a PHP4 vs PHP5 problem. I wish PHP4 would die quickly. :evil:

It'll be fixed in the next version.
Ok, so should I upgrade to PHP5? All this box does is run Cacti, and it's a default installation from the CactiEZ ISO.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

streaker69 wrote:
Howie wrote:
streaker69 wrote:I'll put the $date_time back in. And I just did exactly what you said before you posted this and it's working. Apparently the StateName portion isn't working right. I am using PHP 4.3.9. I'm ok using the numeric values, easy enough to do.
OK. Then it's a PHP4 vs PHP5 problem. I wish PHP4 would die quickly. :evil:

It'll be fixed in the next version.
Ok, so should I upgrade to PHP5? All this box does is run Cacti, and it's a default installation from the CactiEZ ISO.
Nah, if you have a quick fix in place already, stick with that. I'll work around PHP4 for the next version. There are dozens of little PHP4 bodges in there already.
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!)
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Just thought I'd point it out in case it wasn't obvious, but you can put the USESCALE cactiupdown from Howie's previous example in the Node Default section of your config file. Saves from having to type it in on every single node.
joez
Posts: 34
Joined: Mon Feb 11, 2008 7:03 am

Post by joez »

Ok so I can read the status of a device and have different pictures and colors set depending on the status.

Does this also work for single ports on a device?

Thanks
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

joez wrote:Ok so I can read the status of a device and have different pictures and colors set depending on the status.

Does this also work for single ports on a device?

Thanks
Do you have some datasource that contains the status of the ports?
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

In 0.96, if you use the poller_output option, then the RRD datasource plugin will collect all the information that Cacti knows about the interface too.

Basically anything that you can say |query_blah| in a Cacti graph title, will be defined as a variable so you can use {link:this:cacti_blah} in weathermap. For the Interface Traffic template, that includes: ifOperStatus (up/down), ifSpeed, ifAlias/ifDescr (the router's name for the interface), and ifIP.

I'm just adding this in at the moment, but it'll be in the next release. I think there will be a test version in a 2-3 weeks, at the moment. At that stage you would be able to use the ifOperStatus in the ICON filename for an interface. I'll try and get an example together when the test release is 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!)
Lemmy78
Posts: 25
Joined: Tue Apr 04, 2006 10:36 am

Post by Lemmy78 »

Hi guys,

I just read the topic about the display icon depending of the host status.

I've also have the ICON images\router_{UNKOWN}.png error.

I'm running cacti 0.87a with weathermap 0.94.

I tried a lot of changes without success. I stil have the message.

Any help would be appreciated


Thanks


Regards
Ubuntu 7.04
Cacti 0.8.7a - PHP Weathermap 0.94
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Lemmy78 wrote:Hi guys,

I just read the topic about the display icon depending of the host status.

I've also have the ICON images\router_{UNKOWN}.png error.

I'm running cacti 0.87a with weathermap 0.94.

I tried a lot of changes without success. I stil have the message.

Any help would be appreciated
You are more likely to get help if you said:
* what your config looks like
* what you tried

The [UNKNOWN] means that the {} variable you are using isn't defined. Post your config.
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!)
Lemmy78
Posts: 25
Joined: Tue Apr 04, 2006 10:36 am

Post by Lemmy78 »

My config
NODE node05521
TARGET cactihost:154
USESCALE non
LABEL mylabel
INFOURL https://url
OVERLIBGRAPH https://url
ICON images/router_{node:this:state}.png
LABELOFFSET 0 22
POSITION 900 420
Reading the post, I've tried to replace state with banwidth_in and I get value "3".
I'm using PHP 5.2.1.

Do you need more ?

Thanks[/quote]
Ubuntu 7.04
Cacti 0.8.7a - PHP Weathermap 0.94
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest