WeatherMap Change interafce status up/down

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

WeatherMap Change interafce status up/down

Post by smileymind »

Dear All,

I have one question, current I follow the template of " viewtopic.php?t=54189 " and try to change interface template to make it red when it down/ green when it up/ brown when it unknown state. I follow all the line of syntax in the template, but I still cannot trigger as what I want. Please see my sample configuration and let's me know if you have any comments.
------------------------------------------------------------------------------------------------------------------------
#/Template
NODE SAXXX3850INT-G1017
INFOURL /graph.php?rra_id=all&local_graph_id=35758
OVERLIBGRAPH /graph_image.php?local_graph_id=35758&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
ICON images/port_{node:this:inscaletag}.png
TARGET gauge:/var/www/cacti/rra/SA_XXX_int_3850_int_status_36798.rrd:int_status:-
USESCALE ifstatus in percent
POSITION XXX_3850_INTERNAL -98 4
#/End

#/Testing
NODE TEST
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=40717
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=40717
ICON images/port_{node:this:inscaletag}.png
TARGET gauge:/var/www/cacti/rra/236/32817.rrd:int_status:-
USESCALE ifstatus in percent
POSITION 70 461
#/End
---------------------------------------------------------------------------------------------
- CACTI v0.8.8h
- Weathermap v0.98
----------------------------------------------------------------------------------------------
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: WeatherMap Change interafce status up/down

Post by Howie »

What does your ifstatus scale look like?

Do you get any errors in the cacti.log?

Two most likely issues:
1) you aren't getting useful data (there will be warnings if the target is invalid or the DS doesn't exist)
2) you aren't telling weathermap what to do with it (there will be warnings about missing images, most likely)
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!)
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Re: WeatherMap Change interafce status up/down

Post by smileymind »

Howie wrote: Mon Feb 22, 2021 8:53 am What does your ifstatus scale look like?

Do you get any errors in the cacti.log?

Two most likely issues:
1) you aren't getting useful data (there will be warnings if the target is invalid or the DS doesn't exist)
2) you aren't telling weathermap what to do with it (there will be warnings about missing images, most likely)
Attachments
icon_state.png
icon_state.png (10.58 KiB) Viewed 6794 times
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Re: WeatherMap Change interafce status up/down

Post by smileymind »

SCALE ifstatus 0 0.99 255 209 71 2
SCALE ifstatus 1 1 0 255 0 1
SCALE ifstatus 1.01 2 255 209 71 2
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Re: WeatherMap Change interafce status up/down

Post by smileymind »

02/24/2021 02:06:01 PM - WEATHERMAP: Poller[0] WARNING: [Map 115] testing.conf: ReadData: NODE TEST, target: gauge:/var/www/cacti/rra/236/32817.rrd:int_status:- on config line 158 of /var/www/cacti/plugins/weathermap/configs/testing.conf had no valid data, according to WeatherMapDataSource_rrd
02/24/2021 02:06:01 PM - WEATHERMAP: Poller[0] WARNING: [Map 115] testing.conf: RRD ReadData: At least one of your DS names (int_status and -) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: traffic_in,traffic_out, [WMRRD06]
02/24/2021 02:06:01 PM - WEATHERMAP: Poller[0] WARNING: [Map 115] testing.conf: RRD ReadData: poller_output: int_status is not a valid DS name for /236/32817.rrd - valid names are: traffic_out, traffic_in [WMRRD07]
Rno
Cacti Pro User
Posts: 714
Joined: Wed Dec 07, 2011 9:19 am

Re: WeatherMap Change interafce status up/down

Post by Rno »

This is my config:
SCALE linkupdown 0 0.5 192 192 192 Unknown
SCALE linkupdown 0.5 1.5 0 255 0 Up
SCALE linkupdown 1.5 2 255 0 0 Down

NODE SRE-LNK-86-SRE-LNK-85-STATUS
LABEL {node:this:inscaletag}
LABELOFFSET c
ICON none
TARGET gauge:/usr/share/cacti/rra/sre-lnk-86_int_status_14539.rrd:int_status:-
USESCALE linkupdown in percent
POSITION 500 675
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 714
Joined: Wed Dec 07, 2011 9:19 am

Re: WeatherMap Change interafce status up/down

Post by Rno »

By the way check your data source under:
console -> your device -> data source -> and turn on data source info mode
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: WeatherMap Change interafce status up/down

Post by Howie »

Right, so that's a TRAFFIC graph, and the scale and weathermap config are expecting interface status (up,down,disabled etc from SNMP ifOperStatus). That's why you are getting warnings about missing data. You'll need to set up interface status graphs for these interfaces in Cacti if you want to do this. That will create a new rrd file for each one, which should be your TARGET.
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 1 guest