Updated 05/2012: Graph Sockets Pipes and FIles
Moderators: Developers, Moderators
Updated 05/2012: Graph Sockets Pipes and FIles
Since everything in Linux/Unix is a file, Linux has some interesting ways to monitor for problems. Often systems administrators monitor CPU, Ram, Disk Space, and Network Usage. These are all valid data points and are especially useful for capacity planning. For real time detection of problems, especially with web/application/databases, these are not always the best indicators. In my experience, checking and trending the number of open sockets, pipes, files, tcp/udp sockets, and unix sockets has been the single best indicator of a problem. These have been much better than CPU, Load, or I/O Wait. In fact, under optimal usage of server hardware, one would expect spikes in CPU, RAM, and I/O.
Instructions: http://crunchtools.com/software/cruncht ... pes-files/
Versioned Code: http://code.google.com/p/crunchtools/so ... ipes_files
Instructions: http://crunchtools.com/software/cruncht ... pes-files/
Versioned Code: http://code.google.com/p/crunchtools/so ... ipes_files
- Attachments
-
- sockets_pipes_files.tgz
- (112.34 KiB) Downloaded 351 times
Last edited by scottevil on Fri Apr 12, 2013 9:50 pm, edited 7 times in total.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: Graph Sockets Pipes and FIles
If you get a chance, please post this to the scripts and templates area:
http://docs.cacti.net/scripts
http://docs.cacti.net/scripts.guidelines
http://docs.cacti.net/templates
http://docs.cacti.net/templates.guidelines
http://docs.cacti.net/scripts
http://docs.cacti.net/scripts.guidelines
http://docs.cacti.net/templates
http://docs.cacti.net/templates.guidelines
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Re: Graph Sockets Pipes and FIles
The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend. Extend also isn't a drop in replacement, the OID's get fairly screwy and the trick of executing the netstat calls in the background no longer works which can hang cacti.
These two threads go into greater detail.
http://www.mail-archive.com/net-snmp-us ... 14895.html
http://www.mail-archive.com/net-snmp-us ... 14731.html
These two threads go into greater detail.
http://www.mail-archive.com/net-snmp-us ... 14895.html
http://www.mail-archive.com/net-snmp-us ... 14731.html
Re: Graph Sockets Pipes and FIles
Nothing to do with Ubuntu. net-snmp deprecated exec some time ago.spackler wrote:The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend.
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Re: Graph Sockets Pipes and FIles
Yeah, I knew this was coming because I had tested in fedora with newer versions of net-snmpd and it was complaining. I looked at the fix a while back and you are correct, it is a bit screwy to say the least. I will mess with it and update it.spackler wrote:The sh/exec functionality appears to have been removed from the ubuntu distributions in favor of keyword extend. Extend also isn't a drop in replacement, the OID's get fairly screwy and the trick of executing the netstat calls in the background no longer works which can hang cacti.
These two threads go into greater detail.
http://www.mail-archive.com/net-snmp-us ... 14895.html
http://www.mail-archive.com/net-snmp-us ... 14731.html
Scott M
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: Updated 05/2012: Graph Sockets Pipes and FIles
Alright, I finally updated this to work despite the deprecated sh/exec directive. It was actually quite hilarious that one can code around this problem by using a C or Perl AgentX module. I used an embedded version of the perl module so the configuration is almost exactly as easy as before. It is one directive, one server side file, and one client side file.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: Updated 05/2012: Graph Sockets Pipes and FIles
This project looks very interesting. I notice there are client and server scripts, since I only need to monitor a local server I will try to make it work. Does anyone test this on localhost?
Re: Updated 05/2012: Graph Sockets Pipes and FIles
I have used it on localhost through snmp, but you could probably tweak it to work with the scripts only.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: Updated 05/2012: Graph Sockets Pipes and FIles
$tmp is not yet used while reading the files, it still uses /var/lib/net-snmp.
Re: Updated 05/2012: Graph Sockets Pipes and FIles
I get the following error when trying to run this script.
Can't call method "register" on an undefined value at /etc/snmp/spf.pl line 97.
Can't call method "register" on an undefined value at /etc/snmp/spf.pl line 97.
-
- Cacti User
- Posts: 60
- Joined: Wed Mar 02, 2011 9:02 am
Re: Updated 05/2012: Graph Sockets Pipes and FIles
I tried to install these templates - unfortunately the spf.pl script gives the following error:
Any help to this?
Code: Select all
Can't locate NetSNMP/agent.pm in @INC (you may need to install the NetSNMP::agent module) (@INC contains: /etc/perl /usr/local/lib/i386-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/i386-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/i386-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base) at spf.pl line 26.
BEGIN failed--compilation aborted at spf.pl line 26.
Re: Updated 05/2012: Graph Sockets Pipes and FIles
Do you have the NetSNMP devel libraries install? I suspect that's what you'll need for Perl to link into it.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 3 guests