Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 24, 2017 11:04 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Thu Mar 29, 2007 10:42 am 
Offline
Cacti Pro User
User avatar

Joined: Mon Mar 27, 2006 10:35 am
Posts: 711
Location: Psychic Amish Network Administrator
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.

Quote:
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:

Quote:
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].


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 10:50 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 10:54 am 
Offline
Cacti Pro User
User avatar

Joined: Mon Mar 27, 2006 10:35 am
Posts: 711
Location: Psychic Amish Network Administrator
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:
                $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}.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 11:33 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 11:35 am 
Offline
Cacti Pro User
User avatar

Joined: Mon Mar 27, 2006 10:35 am
Posts: 711
Location: Psychic Amish Network Administrator
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 11:48 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 11:51 am 
Offline
Cacti Pro User
User avatar

Joined: Mon Mar 27, 2006 10:35 am
Posts: 711
Location: Psychic Amish Network Administrator
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 12:09 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 6:32 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Mar 27, 2006 10:35 am
Posts: 711
Location: Psychic Amish Network Administrator
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 18, 2008 6:47 am 
Offline

Joined: Mon Feb 11, 2008 7:03 am
Posts: 34
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 18, 2008 6:51 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 9:49 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 12, 2008 5:00 am 
Offline

Joined: Tue Apr 04, 2006 10:36 am
Posts: 25
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 12, 2008 6:32 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5055
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 12, 2008 7:16 am 
Offline

Joined: Tue Apr 04, 2006 10:36 am
Posts: 25
My config

Quote:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group