Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
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].
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...
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].
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}.
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.
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.
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.
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.
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.
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.
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.
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.
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.