Switch Interface status weathermap

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

User avatar
zoemu
Cacti User
Posts: 287
Joined: Fri Jul 10, 2009 1:38 pm
Location: Toronto, Canada

Post by zoemu »

I've just realized that error shows up in every plugin page tab, except for Console and Graphs.....I'm trying to track iT
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

I get the following when trying to do this with a tunnel interface on an 2800 router.

09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@WeatherMapDataSource_rrd.php:641] [Map 1] Brady ISR: RRD ReadData: Returning (1,0,1253262600)
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:492] [Map 1] Brady ISR: RRD ReadDataFromRealRRD: Returning (1.0000000000e+00,0,1253262600)
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:458] [Map 1] Brady ISR: 1.0000000000e+00 is OK value for int_status
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] Brady ISR: --1253262600: 1.0000000000e+00
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] Brady ISR: --1253262900: nan
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:437] [Map 1] Brady ISR: --
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:428] [Map 1] Brady ISR: RRD ReadData: Headings are: int_status
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:427] [Map 1] Brady ISR: RRD ReadData: Read 5 lines from rrdtool
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] Brady ISR: >
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] Brady ISR: > 1253262900: nan
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] Brady ISR: > 1253262600: 1.0000000000e+00
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] Brady ISR: > 1253262300: 1.0000000000e+00
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:419] [Map 1] Brady ISR: > 1253262000: 1.0000000000e+00
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:399] [Map 1] Brady ISR: RRD ReadData: Running: /usr/local/rrdtool/bin/rrdtool fetch /www/htdocs/cacti/rra/aucrc001_int_status_814.rrd AVERAGE --start now-800 --end now
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:359] [Map 1] Brady ISR: RRD ReadData: traditional style
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@WeatherMapDataSource_rrd.php:611] [Map 1] Brady ISR: RRD ReadData: Target DS names are int_status and -
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@WeatherMapDataSource_rrd.php:553] [Map 1] Brady ISR: SCALING result by 1
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@WeatherMapDataSource_rrd.php:533] [Map 1] Brady ISR: Special DS names seen (int_status and -).
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@Weathermap.class.php:781] [Map 1] Brady ISR: ReadData: Matched for WeatherMapDataSource_rrd. Calling WeatherMapDataSource_rrd->ReadData()
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@Weathermap.class.php:737] [Map 1] Brady ISR: ReadData: New Target: gauge:/www/htdocs/cacti/rra/aucrc001_int_status_814.rrd:int_status:-
09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@Weathermap.class.php:729] [Map 1] Brady ISR: ReadData for NODE node06207:

Is it not reading the rrd correctly ?

The config is this :

# Automatically generated by php-weathermap v0.96a



KEYPOS DEFAULT -1 -1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 255 255 255
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0

SET key_hidezero_DEFAULT 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
ICON /www/htdocs/cacti/plugins/weathermap/images/status_{node:this:bandwith_in:%d}.png
MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
BANDWIDTH 100M


# regular NODEs:

NODE node01824
LABEL AUCRC001
ICON images/Host.png
POSITION 50 50

NODE node06207
INFOURL http://cacti/cacti/graph.php?rra_id=all ... aph_id=639
OVERLIBGRAPH http://cacti/cacti/graph_image.php?rra_ ... aph_id=639
TARGET gauge:/www/htdocs/cacti/rra/aucrc001_int_status_814.rrd:int_status:-
POSITION 80 80

NODE node00193
LABEL Node
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=496
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=496
ICON images/status_1.png
POSITION 195 51




# regular LINKs:


# That's All Folks!

I just started playing with it, so i'm not sure where to start to look.
I can't use the thold bit as I will need it to show down too when it's "nan" as we have some sites where there's no 2nd router.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

JorisFRST wrote:09/18/2009 10:32:06 AM - WEATHERMAP: Poller[0] DEBUG: [readdata@WeatherMapDataSource_rrd.php:641] [Map 1] Brady ISR: RRD ReadData: Returning (1,0,1253262600)
Is it not reading the rrd correctly ?
It is reading the value just fine, assuming the value is 1. Nothing you posted in the log output is an error. You are just running with DEBUG logging, so it tells you everything.

You didn't say what the actual problem was, but you would normally add a USESCALE for the node, and define a new scale for interface status.
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
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

Hi,

yes I put it in debug.

It's reading the value as being 1, wich is correct as the tunnel is up.

but when it has to draw the picture it says [UNKNOWN] for the value.
(sorry, must have dropped off my log post)

09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [pre_render@WeatherMapNode.class.php:442] [Map 1] Brady ISR: Skipping unavailable imagefilter() call.
09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [mysprintf@WeatherMap.functions.php:141] [Map 1] Brady ISR: Falling through to standard sprintf
09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [mysprintf@WeatherMap.functions.php:124] [Map 1] Brady ISR: mysprintf: %d [UNKNOWN]
09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [processstring@Weathermap.class.php:597] [Map 1] Brady ISR: ProcessString: replacing {node:this:bandwith_in:%d} with [UNKNOWN]
09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [processstring@Weathermap.class.php:564] [Map 1] Brady ISR: ProcessString: Found appropriate item: weathermapnode node06207
09/18/2009 10:57:06 AM - WEATHERMAP: Poller[0] DEBUG: [drawmap@Weathermap.class.php:2785] [Map 1] Brady ISR: Pre-rendering node06207 to get bounding boxes.

So the actual error is it's not showing the right image.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Code: Select all

{node:this:bandwith_in:%d}
bandwiDth has a d in 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!)
User avatar
JorisFRST
Cacti User
Posts: 229
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Post by JorisFRST »

:oops:

Damned, I read that 10 times, and still missed it, thank you :oops:

edit : Surprisingly it works perfect now :oops:
User avatar
pizu
Posts: 42
Joined: Thu Nov 17, 2011 5:15 pm

Re: Switch Interface status weathermap

Post by pizu »

BACKGROUND images/2500_1100bg.png
WIDTH 2500
HEIGHT 1100
HTMLSTYLE overlib
TITLE GO_External_Sites

KEYPOS DEFAULT -1 -1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 255 255 255
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0

SET key_hidezero_DEFAULT 1
SET rrd_use_poller_output 1
SET nowarn_clipping 1
SET screenshot_mode 1
SET link_bulge 2

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
MAXVALUE 100

# TEMPLATE-only LINKs:
LINK DEFAULT
WIDTH 4
BANDWIDTH 1G


# regular NODEs:

----


I got this small weathermap and am wondering how can I add the up/down status picture near the names using..

SCALE ifstatus 0 1.5 255 0 0 images/down.png
SCALE ifstatus 1.5 2.5 0 255 0 images/up.png

as indicated in this thread..
Attachments
Ext.ss1.ed
Ext.ss1.ed
PHP Weathermap Editor 0.97a - Google Chrome.jpg (97.51 KiB) Viewed 8814 times
Regards,
Pizu
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Switch Interface status weathermap

Post by aftershocks »

Hey Howie,

I can't seem to get this to work... Here is what I have.. I'm purposely trying to display an up status as I'm graphing an interface that is currently UP... Respectively, the down status is graphing a down interface. I'm using the interface status template where 1 represents UP and 2 represents DOWN... I've located the rrd files pertaining to the UP interface and DOWN interface from the Data Source... What I'm seeing now is both arrows in weather maps (when it's drawn) are showing "UP" when one should be UP and the other should be DOWN. So I know it's not working correctly..

Is this the case where it's rounding down? I turned on debug but couldn't find any error messages pertaining to this.. Is this the case related to the rounding down of the decimal so it will always show "1" as UP?

Please help if you can.. Thanks so much!


NODE UP_STATUS
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2593
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=2593
ICON 20 22 images/arrow_{node:this:bandwidth_in}.gif
TARGET gauge:/var/lib/cacti/rra/sfo-net-partner01_int_status_2596.rrd:int_status:-
POSITION 1759 518

NODE DOWN_STATUS
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2598
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=2598
ICON 20 22 images/arrow_{node:this:bandwidth_in}.gif
TARGET gauge:/var/lib/cacti/rra/sfo-net-partner01_int_status_2601.rrd:int_status:-
POSITION 1770 518
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Switch Interface status weathermap

Post by aftershocks »

oh, and I've even tried appending %d... but no luck... Same deal..
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Switch Interface status weathermap

Post by Howie »

In the debug log, you should see lines saying "Returning (x,y)" from ReadData. What do those say for this icon?

Personally I wouldn't use the bandwidth_in directly in the filename. I'd use scale tags:

Code: Select all

SCALE updown 0.8 1.5 0 255 0 arrow_up.gif
SCALE updown 1.5 2.5 255 0 0 arrow_down.gif

NODE blah
   ICON 20 22 images/{node:this:inscaletag}
   USESCALE updown in
[etc]

This avoid any issues with rounding by rrdtool.
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!)
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Switch Interface status weathermap

Post by aftershocks »

Hi Howie,

So I still don't see anything with "Returning (x,y)" from the logs...

What I'm trying to setup is arrow_1.gif = UP & arrow_2.gif is DOWN...

I will try out the code that you suggested and let you know...

Thanks!
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Switch Interface status weathermap

Post by aftershocks »

Wait.. Will that work if I'm trying to achieve the 1 and 2 status?

Because in your scale, you listed as arrow_up and arrow_down...

I'm confused...
aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Switch Interface status weathermap

Post by aftershocks »

holy smokes... i don't know what happened or what i did... but it's showing correctly now..
Attachments
arrow_status.jpg
arrow_status.jpg (13.01 KiB) Viewed 7880 times
VictorJ
Posts: 13
Joined: Mon Apr 03, 2017 4:48 am

Re: Switch Interface status weathermap

Post by VictorJ »

I tried to change the icon of my node with your instruction :
To change the icon, the easiest way is to use the same SCALE again:

SCALE ifstatus 0 1.5 255 0 0 images/down.png
SCALE ifstatus 1.5 2.5 0 255 0 images/up.png

Then in the node, you can use 'ICON {node:this:inscaletag}' which will contain the text 'tag' from the SCALE line that matches for that node .
My conf looks like this :

Code: Select all

KEYPOS DEFAULT -1 -1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0    0    192 192 192
SCALE DEFAULT 0    1    255 255 255
SCALE DEFAULT 1    10   140   0 255
SCALE DEFAULT 10   25    32  32 255
SCALE DEFAULT 25   40     0 192 255
SCALE DEFAULT 40   55     0 240   0
SCALE DEFAULT 55   70   240 240   0
SCALE DEFAULT 70   85   255 192   0
SCALE DEFAULT 85   100  255   0   0

SCALE updown 0.8  1.5    0 255   0  images/state_1.png
SCALE updown 1.5  2.5  255   0   0  images/state_2.png

SET key_hidezero_DEFAULT 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
        MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
        BANDWIDTH 1000M


# regular NODEs:
NODE PCC
        LABEL MYIP
        INFOURL http://MYIP/device/device=4/
        OVERLIBGRAPH http://MYIP/graph.php?height=100&width=512&device=4&type=device_bit$
        ICON {node:this:inscaletag}
        USESCALE updown in
        POSITION 343 212
Nothing happen and in the web interface the Icon filename is replace by my special string (refer to the picture).


Ps: I using Php Weathermap 0.97c on Librenms Plugin.
Attachments
Capture.PNG
Capture.PNG (2.35 KiB) Viewed 6663 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Switch Interface status weathermap

Post by Howie »

The editor part is expected - the editor has no way to know what the value of that variable is.

If it doesn't work when the map is generated though, rule 1 applies: what does it say in the cacti.log?
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests