Updated Zabbix Template

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Goto page 1, 2  Next
Author Message
textbuk
DD-WRT Novice


Joined: 25 Apr 2020
Posts: 2

PostPosted: Fri May 08, 2020 18:03    Post subject: Updated Zabbix Template Reply with quote
I found that the template to link ddwrt to zabbix was out of date. I have updated the file and hope someone will find it useful in their setup.

I got errors where the following are missing on some items:

<snmpv3_contextname/>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<logtimefmt/>

Will probably keep on updating it until we have official updates.
Sponsor
SparkStormrider
DD-WRT Novice


Joined: 08 Sep 2015
Posts: 7

PostPosted: Fri May 15, 2020 16:07    Post subject: Reply with quote
Thanks for the info! That corrected the errors I was getting when trying to import to my Zabbix 4.4 instance.

Currently I have a Linksys wrt3200acm being monitored by an instance of Zabbix 4.4.8. I noticed that I was not getting any data for the "Network Traffic WAN" under graphs. Upon further investigation it was trying to pull information from port "ppp0". I replaced every instance of ppp0 with eth0 in the template and data is now populating on the graph. I am going to do some testing to ensure accuracy.
textbuk
DD-WRT Novice


Joined: 25 Apr 2020
Posts: 2

PostPosted: Sat May 16, 2020 0:57    Post subject: Reply with quote
I am happy you were able to find this solution useful. Please post an updated template after you have done your testing, I was also not able to recieve any data for network trafficking and that may be the culprit. Thanks!
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12814
Location: Netherlands

PostPosted: Sat May 16, 2020 7:49    Post subject: Reply with quote
If you are happy with it please file a "bug" report in the bug tracker otherwise it will not get updated:
https://svn.dd-wrt.com/

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
SparkStormrider
DD-WRT Novice


Joined: 08 Sep 2015
Posts: 7

PostPosted: Thu May 28, 2020 17:54    Post subject: Reply with quote
Hey textbuk, good idea. I have attached my 4.4 template. Here is what I have updated on mine. You should see WAN graphing, LAN graphing, I have also added some graphs for 2.4ghz bandwidth in and out, 5ghz band in and out. I have only tested on wrt3200acm.

This will also import into a Zabbix 5.0 LTS instance. However I don't think it will work if you modify it in 5.0 export it again and try and import into previous versions. There are some extra things in 5.0 that I am seeing that's not in previous versions such as "Screens". This is pure speculation however as I am still learning some 5.0 stuff, since my 4.4 instance went *POOF*.

Edit: Forgot to add. I modified the Incoming and Outgoing traffic items, units bps from Bps, and added custom multiplier of 8 to each so that I could get values in bits per second instead of Bytes per second. Also I modified "Network Traffic WLAN" to "Network Traffic LAN" because eth1 that its graphing is actually the LAN. LAN/WLAN might be more accurate, but I haven't had a chance to circle back around and address it. Feel free to PM me if you like and we can discuss further if you want.


Last edited by SparkStormrider on Thu May 28, 2020 19:11; edited 2 times in total
SparkStormrider
DD-WRT Novice


Joined: 08 Sep 2015
Posts: 7

PostPosted: Thu May 28, 2020 17:57    Post subject: Reply with quote
egc wrote:
If you are happy with it please file a "bug" report in the bug tracker otherwise it will not get updated:
https://svn.dd-wrt.com/


I wouldn't say 100% happy with it yet as there are some things that aren't quite working yet that I am trying to see if it's my router, or if its the template with incorrect values. Once I determine everything is working as I would like, I'd like to try working with another router to ensure that it'll work with it. It's possible there are different parameters for different routers?
medic24
DD-WRT Novice


Joined: 01 Sep 2020
Posts: 1

PostPosted: Tue Sep 01, 2020 17:50    Post subject: Reply with quote
nevermind, the files displayed after registering.
Koreldan
DD-WRT Novice


Joined: 18 Oct 2018
Posts: 4

PostPosted: Mon Sep 07, 2020 9:24    Post subject: Reply with quote
doesn't work on zabbix 5.0
creited
DD-WRT Novice


Joined: 26 Jun 2016
Posts: 15

PostPosted: Wed Oct 07, 2020 23:48    Post subject: Reply with quote
Unable to import in Zabbix 5.0. Any update?
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Sun Oct 25, 2020 0:25    Post subject: Reply with quote
Posting so I get email updates.

I have Zabbix running on a RaspberryPi 3. I initially upgraded to RPi buster so I could upgrade to Zabbix 5, but then I imported a database dump and think I have corrupted the install of Zabbix 5 as nothing can be created/imported due to duplicate PK in database...something is out of sync.

I have a secondary RPi and I am going to try to import these templates into it, WITHOUT doing the DB restore. Hopefully it will import the template and that most of the data/graphs will work.

I'm noticing a lot of the items in the current installation have preprocessing steps for some JSON validation that is breaking most of them. Can't seem to figure out how to remove those preprocessing steps on the host/template. Hopefully the fresh import on the fresh installation will help.

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Mon Oct 26, 2020 23:35    Post subject: Reply with quote
I took one of the templates and imported it into a clean Zabbix 5.0.4 installation. I then,
    --Added items (up to 167 now mostly around network traffic in/out errors/discards for broadcom interfaces such as eth1, eth2, wl0.1, wl1.1, br0, br1, vlan1, and vlan2),
    --Added more graphs (from 6 to now 15 mostly around network traffic for WAN, LAN and wireless networks, and a couple for client counts on network and guest network),
    --Added triggers (my config is to trigger when services ARE running, not when they are not--i.e. FTP or SMTP),
    --Created new UserParameters in the Zabbix config section of the Services tab on Admin UI (I will add those further down),
    --and made sure that everything was working at least for my configuration
I am running Netgear R7000s (one active, the second I inherited in a box as backup) running Kong Build 40270M.

I am running the Zabbix server on Raspberry Pi 3's (one active, the second I also inherited as backup). The Raspberry Pi's are also running Pi-Hole v5.1.2 and DNSCrypt-Proxy v2.0.44.

The custom UserParameters I have in the router config are:
    UserParameter=temperature.cpu, cat /proc/dmu/temperature
    UserParameter=clients.wl0.1, /usr/sbin/wclients wl0.1
    UserParameter=clients.wl1.1, /usr/sbin/wclients wl1.1
    UserParameter=clients.hardwired, /usr/sbin/clients 2> /dev/null
The clients.hardwired is to prevent errors with the clients.wired built in parameter that I can't edit because it tries to grab client counts from a WL3 radio that the R7000s don't have (they are dual-band routers), and the graphs I created in my template are focused around br0 (vlan1, eth1, and eth2) that is for my network, and br1 (wl0.1, and wl1.1) that's for my guest wifi.

I learned a lot during this rebuild process and there's still more I want to cover with graphs in the form of watching process counts, and free space on /opt and /jffs, so I can update this template when I get those figured out.

Word to the wise, don't import DB data from a previous version of Zabbix--it jacked up all of my graphs, and also messed up the database leaving me unable to modify almost anything.

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy


Last edited by HalfBit on Sun Nov 08, 2020 18:01; edited 1 time in total
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Sat Oct 31, 2020 19:24    Post subject: Reply with quote
I've made some more updates to include graphs for free vs. used disk space on /opt and /jffs, and also total connections. The latest list of UserParameters in the Admin UI are:
Code:
UserParameter=temperature.cpu, cat /proc/dmu/temperature
UserParameter=clients.wl0.1, /usr/sbin/wclients wl0.1
UserParameter=clients.wl1.1, /usr/sbin/wclients wl1.1
UserParameter=clients.hardwired, /usr/sbin/clients 2> /dev/null
UserParameter=net.connections, grep -c . /proc/net/ip_conntrack
UserParameter=net.netstat.cksum, netstat -lnt 2> /dev/null | sort | md5sum | tr -cd 0-9 | cut -b1-10 2> /dev/null

Here are the new totals in the template:
    180 total items
    54 triggers
    19 graphs

I also updated the server to 5.0.5. I changed the colors around a bit as well. Again, hope it helps.

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy


Last edited by HalfBit on Sun Nov 08, 2020 18:00; edited 1 time in total
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Sun Nov 08, 2020 17:59    Post subject: Reply with quote
I've now updated the template with items and graphs for br2, eth3, wl0.2, wl1.2 and iph0 interfaces. I also added some triggers for CPU and wireless card temperatures, and other miscellaneous tweaks on item keys, names and graph names I can't remember them all.

I've learned more about iPhone tethering by having ISP problems the last couple weeks and discovered that the iph0 device is created and listed in the /proc/net/dev file. Thus I created a specific graph for network WAN traffic on that interface as well as built out additional interface items and graphs for other interfaces/bridges should I expand my network, get a tri-band router, or other users have configs/needs for those already.

I'm currently up to:
    212 items
    57 triggers
    and 23 graphs.

I'm trying to keep this as "universal" as possible between broadcom and atheros based devices, but I don't have an atheros device to confirm if items are pulling data accurately or fully understand which interface is which (i.e. ath0 vs. ath1 - which I believe to be eth0 and eth1 equivalents on the broadcom side).

No significant changes to the zabbix.conf file (custom UserParameters in the Admin UI) on the router.

If anyone with atheros bases routers would like to collaborate and help test, I'd be open to that.

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy


Last edited by HalfBit on Fri Nov 20, 2020 0:55; edited 1 time in total
chaski
DD-WRT Novice


Joined: 02 Nov 2020
Posts: 20

PostPosted: Thu Nov 19, 2020 22:28    Post subject: Reply with quote
HalfBit - I’ve got a fresh 5.2 Zabbix install and an atheros r7800. Will give this template a spin when I can. I’m pretty new to Zabbix, but would definitely like to monitor the router. Will see how it goes.
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Fri Nov 20, 2020 0:54    Post subject: Reply with quote
chaski wrote:
HalfBit - I’ve got a fresh 5.2 Zabbix install and an atheros r7800. Will give this template a spin when I can. I’m pretty new to Zabbix, but would definitely like to monitor the router. Will see how it goes.

Awesome. That's the model I've been wanting to test it on so that's great to hear. Bring on the questions. I'm no expert, but I have learned a TON this go around, and I've been able to integrate the statistics from my pi-hole using the APIs.

If you haven't yet imported the template, here's an updated version. I've tweaked colors, interval times and other minor things...maybe an item or two.

It's up to:
    216 items
    58 triggers
    23 graphs

Here's my config for UserParameters in the Admin GUI:
Code:
Server=xx.xx.xx.xx,xx.xx.xx.xx,xx.xx.xx.xx
UserParameter=temperature.cpu, cat /proc/dmu/temperature
UserParameter=clients.wl0.1, /usr/sbin/wclients wl0.1
UserParameter=clients.wl1.1, /usr/sbin/wclients wl1.1
UserParameter=clients.hardwired, /usr/sbin/clients 2> /dev/null
UserParameter=net.connections, grep -c . /proc/net/ip_conntrack
UserParameter=net.netstat.cksum, netstat -lnt 2> /dev/null | sort | md5sum | tr -cd 0-9 | cut -b1-10 2> /dev/null
UserParameter=net.connections.max, /usr/sbin/nvram get ip_conntrack_max
UserParameter=net.netstat, netstat -lnt 2> /dev/null | sort

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum