Posted: Mon Dec 13, 2010 18:07 Post subject: Forget about SNMP, Cacti, MRTG
Thanks to Kong, who compiled the Zabbix agent for me, we now have the ability to run a zabbix agent on our DD-WRT router.
Zabbix is a monitoring server that can do all kinds of checks on different platforms. The agent is about 300 KB and the first thing I did was compare it to the snmpd daemon which is 500 KB.
SNMP is a standardized system to monitor/control systems, but that's where its usefullness stops more or less.
I will write a supporting script for it, so you're able to turn it on/off with OTRW.
I will include some of the scripts I already wrote like checking for a change in iptables.....
Joined: 24 Aug 2009 Posts: 2070 Location: South Florida
Posted: Mon Dec 13, 2010 19:12 Post subject:
Awesome man...You are a machine!
Ill talk to you on Skype _________________ Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Joined: 31 Jul 2009 Posts: 492 Location: Toronto, ON, CA
Posted: Fri Dec 17, 2010 6:19 Post subject:
Does this tool also require server side software and if so, does the server side software support Windows? Also are there any tutorials on how to set it up?
frater wrote:
I have created a Zabbix template for DD-WRT based on the Linux template.
I also added some special items/triggers that I previously wrote for Zabbix.
Don't waste your time with other monitoring systems. Especially if you want to monitor DD-WRT.
_________________ Asus RT-N16 [Build King Kong 18050M NEWD-2 K2.6 + Optware + My Page]
Does this tool also require server side software and if so, does the server side software support Windows? Also are there any tutorials on how to set it up?
Yes, it requires you to setup a server with PHP/Apache. @home I have a HTPC running Windows 7 with vmware server which is running 3 virtual machines (2x Ubuntu Lucid Lynx, 1 Windows 2000).
It took me almost no time to setup Zabbix on that machine which already was running websites.
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
I wrote some additions to zabbix that are quite powerful. Of course they are added to the one I install with optware.
They are called "regtop" and "regcount". They return the amount of lines that hold a certain regular expression since you last called it.
With regtop you can easily extract info from files..
sshot-13.jpg
Description:
Filesize:
67.33 KB
Viewed:
48691 Time(s)
sshot-12.jpg
Description:
Filesize:
171.58 KB
Viewed:
48691 Time(s)
sshot-11.jpg
Description:
Filesize:
251.61 KB
Viewed:
48691 Time(s)
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
I decided to show the graph of a serious server I'm monitoring using my 'regcount' and Zabbix.
18.000 ~ 24.000 connections....
Here it's just counting all the lines in /proc/net/ip_conntrack.
Yes... it's thousands of connections and they are all valid....
Because you scan log-files as well, you can also react on errors, warnings or just info that's generated by a service. With SNMP you can merely get the straight data and most services don't even support SNMP.
sshot-16.jpg
Description:
Filesize:
241.25 KB
Viewed:
48535 Time(s)
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Joined: 16 Dec 2009 Posts: 83 Location: Florence (ITALY)
Posted: Mon Jan 03, 2011 10:29 Post subject: Zabbix agent dd-wrt is now working
I'm sorry...
I had not seen that already existed in /opt/etc/zabbix/zabbix_agentd.conf
Ok, perfect!
I have just configured the agent but it seems to not be able to write the pid file into /tmp/zabbix_agentd.pid
I have edited the zabbix_agentd.conf setting up to write the pid file into /opt
I have created the pid file in /opt
touch /opt/zabbix_agentd.pid
and i have changed the permission with
chmod 777 /opt/zabbix_agentd.pid
( zabbix user has no right to write access )
Cool! Very cool!
Zabbix agent is fully working!
I have two questions:
1) it would be possible to update the agent to 1.8.3 instead of 1.6.2? ( avaiable as ipkg should be and idea)
Posted: Mon Jan 03, 2011 12:43 Post subject: Re: Zabbix agent dd-wrt is now working
pizzulicchio wrote:
I'm sorry...
I had not seen that already existed in /opt/etc/zabbix/zabbix_agentd.conf
Ok, perfect!
I have just configured the agent but it seems to not be able to write the pid file into /tmp/zabbix_agentd.pid
I have edited the zabbix_agentd.conf setting up to write the pid file into /opt
and what is supposed to be the added value of this?
It writes fine to /tmp
pizzulicchio wrote:
I have created the pid file in /opt
touch /opt/zabbix_agentd.pid
and i have changed the permission with
chmod 777 /opt/zabbix_agentd.pid
( zabbix user has no right to write access )
You mean a solution for a problem you just created. (sorry for being sarcastic)
pizzulicchio wrote:
Cool! Very cool!
Zabbix agent is fully working!
I'm glad you like it
pizzulicchio wrote:
I have two questions:
1) it would be possible to update the agent to 1.8.3 instead of 1.6.2? ( avaiable as ipkg should be and idea)
It's not part of optware. It's compiled on my request by Kong. He had dependency problems with 1.8.x and used 1.6.2
It's the latest config and supporting scripts I wrote....
It's done in prep_optware, but just before I gave you that link I made sure it contained the latest updates.... (a template is included in /opt)
I did see I forgot to translate the domain (corrected now) _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
I'm using zabbix from version 1.4 and i think that it's a very complete monitoring system solution.
I hope in a future 1.8.x agent porting...
Agents and server don't need to be the same version. I'm running Server 1.8.3. Don't worry about updating the agent...
Have you noticed the custom linux functions I wrote (and are also working for DD-WRT)? Are you using the custom template I made for DD-WRT (in /opt)?
It enables me to extract almost anything in a very easy way, sometimes even without changing anything on the clients.... (regtop, regcount)
Today I wrote a tool to fetch the speed/integrity of your DNS. _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Joined: 16 Dec 2009 Posts: 83 Location: Florence (ITALY)
Posted: Mon Jan 03, 2011 23:03 Post subject:
Sure!
I have noticed and installed your template as soon as i saw it into opt.
After the template's import i have found this post and i have asked information about zabbix because I had not noticed that it was already present in /opt
:-)
Your template is very useful and i'm using it.
The trigger "ipv4 interfaces have been changed on server" is the best thing that an human can do!
Now i'm be able to know when my adsl has gone down and up changing ip address.
Only a few bits of advice
I think it would be useful to add some information about wireless section into this template :
1)the number of clients currently connected via wireless
2)the mac address of clients currently connected
3)the signal quality of clients ( signal capcity, db, %strenght )
Should be possible to retreive this value somehow?
Should be possible to retreive this value somehow?
Yes, I think so.... I just need time.... _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge