Updated Zabbix Template

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


Joined: 02 Nov 2020
Posts: 20

PostPosted: Sat Nov 21, 2020 0:27    Post subject: Reply with quote
HalfBit wrote:
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


Awesome, thanks. I've imported it but at the moment can't seem to get any data out of the router.

Very interested in your Pihole monitoring too, as I'm running two instances.
Sponsor
HalfBit
DD-WRT Guru


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

PostPosted: Sat Nov 21, 2020 1:37    Post subject: Reply with quote
chaski wrote:
Awesome, thanks. I've imported it but at the moment can't seem to get any data out of the router.

Very interested in your Pihole monitoring too, as I'm running two instances.

Did you update the Admin GUI with your Zabbix server's IP and enable the service/agent? If you use the Server field in the Admin GUI, you don't need the Server= line unless you're trying/testing from multiple servers and need to enable the connections from each server. The text field in the Admin GUI only allows one IP address.

Do the Zabbix listeners appear to be running? You can tail|less the Zabbix agent logs at /var/log/zabbix.log on the CLI.

_________________
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
chaski
DD-WRT Novice


Joined: 02 Nov 2020
Posts: 20

PostPosted: Sat Nov 21, 2020 23:14    Post subject: Reply with quote
HalfBit wrote:
chaski wrote:
Awesome, thanks. I've imported it but at the moment can't seem to get any data out of the router.

Very interested in your Pihole monitoring too, as I'm running two instances.

Did you update the Admin GUI with your Zabbix server's IP and enable the service/agent? If you use the Server field in the Admin GUI, you don't need the Server= line unless you're trying/testing from multiple servers and need to enable the connections from each server. The text field in the Admin GUI only allows one IP address.

Do the Zabbix listeners appear to be running? You can tail|less the Zabbix agent logs at /var/log/zabbix.log on the CLI.


I’m an idiot.. was trying SNMP. Facepalm. Don’t really have time to play with it today as tiling the kitchen, but I’ve got tons of the template items reporting data.

The only ones that have ‘failed’ are for packages the router doesn’t have installed/services I’m not running. So looks good to me!
HalfBit
DD-WRT Guru


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

PostPosted: Sun Nov 22, 2020 1:50    Post subject: Reply with quote
chaski wrote:
I’m an idiot.. was trying SNMP. Facepalm. Don’t really have time to play with it today as tiling the kitchen, but I’ve got tons of the template items reporting data.

The only ones that have ‘failed’ are for packages the router doesn’t have installed/services I’m not running. So looks good to me!

Now that I think about it, in order for all of the items to work for the DDWRT template, you will need the custom UserParameters in the Admin GUI that I've listed:
    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

Ultimately you can disable or delete things you don't feel are necessary. I've been building the items, triggers and graphs into the template, and disabling irrelevant items/triggers/etc. for things I didn't need, want, or care about on the host.

_________________
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
NLtBal
DD-WRT Novice


Joined: 28 Apr 2021
Posts: 1

PostPosted: Wed Apr 28, 2021 16:30    Post subject: Reply with quote
It would be awesome if DDWRT could write the zabbix info directly to the zabbix data source in the free hosted Grafana cloud service.

Is there a chance that it could be made to work?
SparkStormrider
DD-WRT Novice


Joined: 08 Sep 2015
Posts: 7

PostPosted: Sat Oct 09, 2021 20:05    Post subject: Reply with quote
It's been a while since I have been in this thread. I have recently moved on from Linksys's WRT3200ACM to NetGear's R7800. I adjusted the template I was using and linked earlier in this thread to a newer template as there were a couple of things that wouldn't work just right for the Linksys that's working for the Netgear. On the WAN connection I am still measuring in bites per second vs bytes per second. Folks who want to use the template will need to make sure they turn on the agent and snmp. I'm unsure if it uses SNMP or not, but it does use the zabbix agent. Just go to services in ddwrt and go to the bottom and enable Zabbix Agent, and put in ip address of the Zabbix server you want your device talking to. Then import this template in Zabbix web console.

This template works in Zabbix 5.2, and that was the version that I exported it from. Also I had to zip the yaml file since the file extension is not allowed to be uploaded to DD-WRT's forum.
BassT
DD-WRT Novice


Joined: 01 Sep 2020
Posts: 36

PostPosted: Fri Aug 19, 2022 19:57    Post subject: Reply with quote
I'm using a Linksys WRT54GL with DD-WRT v3.0-r49741 std (08/15/22), but there is no Zabbix in Service Tab.
Where is my problem? Wron DD-WRT Version? What will I need?
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1889

PostPosted: Sat Aug 20, 2022 4:29    Post subject: Reply with quote
You won't see Zabbix on a 4MB flash device, especially an antique like that.
_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
BassT
DD-WRT Novice


Joined: 01 Sep 2020
Posts: 36

PostPosted: Sat Aug 20, 2022 5:12    Post subject: Reply with quote
dale_gribble39 wrote:
You won't see Zabbix on a 4MB flash device, especially an antique like that.


ROFL
Are there any other possibilities for communicate with zabbix, like snmp.
On old build (from 2018) snmp is there.
Or must buy a new router Sad

Edit:
Replaced my WRT45GL to Netgear R6400 and my Archer C8 to Netgear R7000
Now Zabbix Agent work, with the latest template posted here.
THX
buedi
DD-WRT Novice


Joined: 26 Mar 2012
Posts: 13

PostPosted: Wed Mar 22, 2023 16:00    Post subject: Reply with quote
SparkStormrider wrote:
I adjusted the template I was using and linked earlier in this thread to a newer template as there were a couple of things that wouldn't work just right for the Linksys that's working for the Netgear[...]


Dear SparkStormrider,

thank you for sharing your template with us. I am running Zabbix 6.4 and tried to import the latest Template, but unfortunately get the error
Code:
Invalid parameter "/7/trapper_hosts": value must be empty.

I tried to fix this myself, but I can not even find trapper or trapper_hosts within the yaml so I am lost at the moment how to fix this. I hope you are still around, reading this and can maybe share an idea where I could look out for.

The template posted before yours works on import, but as you write, it has some issues you seem to have fixed. So I would be glad if I could use yours Smile
Goto page Previous  1, 2 Display posts from previous:    Page 2 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