Code Monkey home page Code Monkey logo

mysql-snmp's Introduction

MySQL Server SNMP Agent.
Copyright (c) 2008,2009 Brice Figureau <[email protected]>

PREAMBLE
========

mysql-snmp is a MySQL Net-SNMP agent written in Perl, and using the Net-Snmp 
Perl bindings.

It connects to a mysql server and returns information to Net-SNMP when needed.
It parses SHOW INNODB STATUS and other MySQL status variables.

This work is based on Baron Schwartz Mysql Cacti Templates, available at:
http://code.google.com/p/mysql-cacti-templates/

This work is based on the blog post about a SNMP agent:
http://mysqldump.azundris.com/archives/63-Sysadmins-Nightly-Mental-Pain-SNMP.html

This software is released under the GPL v2.


REQUIREMENTS
============

This package requires Net-SNMP version 5.4.3 or better. Previous versions have bugs preventing
returning 64 bits MIBs objects correctly from a perl agentX.

INSTALL
=======

Debian
------

Please build the package:
$ dpkg-buildpackage -rfakeroot -uc- b

and install it
Then, modify /etc/default/mysql-snmp

Other
-----

Modify the Makefile, and:
$ sudo make install

Then create an init.d startup script. You can look to the debian one
in debian/init.d

Install the MIB file in your mibs directory.

CONFIGURE
=========

Configure net-snmp
------------------

Add:
master agentx
to /etc/snmp/snmpd.conf, and restart snmpd
Make sure the mysql-snmp agent is able to open the agentX socket (permissions
and location of said socket can be managed with the snmpd.conf agentXPerms
directive).

Configure mysql-snmp
--------------------

Under debian, the daemon can be configured with /etc/default/mysql-snmp.
On all platform, the configuration is done with command line arguments:

-h|--host HOST          connect to mysql HOST
-P|--port PORT          port to connect to (default 3306)
-u|--user DBUSER        use DBUSER as user to connect to mysql
-p|--password DBPASS    use DBPASS as password to connect to mysql
-c|--config FILE        read MySQL configuration from FILE

-m|--master             check master
-s|--slave              check slave
-b|--heartbeat DB.TABLE table for Percona Toolkit pt-heartbeat 
--oid OID               registering OID
-l|--process-list|--procs
                        enable the MySQL process list
-i|--refresh            refresh interval in seconds

You can specify the mysql connection parameters in a config file using my.cnf format, like this:
For example:

[client]
host=dbserver
port=3306
user=monitor
password=secret


OPENNMS
=======

You'll find in the opennms directory the various configuration snippets
that can be used to let opennms graph the value reported by this agent.

datacollection-config.xml
-------------------------

Add the content of opennms/mysql.datacollection-config.xml to
your datacollection-config.xml file.

Then add this group to your hosts:
<systemDef name="Net-Snmp">
  <sysoidMask>.1.3.6.1.4.1.8072.3.</sysoidMask>
  <collect>
    <includeGroup>mib2-host-resources-system</includeGroup>
    <includeGroup>mib2-host-resources-memory</includeGroup>
    <includeGroup>net-snmp-disk</includeGroup>
    <includeGroup>ucd-loadavg</includeGroup>
    <includeGroup>ucd-memory</includeGroup>
    <includeGroup>ucd-sysstat</includeGroup>
    <includeGroup>mysql</includeGroup>
  </collect>
</systemDef>

And now, add the graph definitions from the opennms/mysql.snmp-graph.properties file 
to your snmp-graph.properties.

mysql-snmp's People

Contributors

dentcat avatar kdreyer-usgs avatar michaelsmit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-snmp's Issues

FreeBSD 8 Compatability

The script doesn't appear to run on FreeBSD 8. It doesn't return errors, and you can't find it under ps. What information would you need to help me resolve this?

FreeBSD 8.0 (amd64)
Perl 5.8.9
MySQL v14.14 D 5.1.46
NET-SNMP v5.6.dev
2ce4be9 branch 'master' of git:/

Broken after upgrading to OpenNMS 1.8.4

Hi

I have been using this for quite sometime and this is indeed a great tool. We were able to fine tune our databases, look at the slave lag etc., Recently we upgraded to OpenNMS 1.8.4 and the data collection suddenly stopped. I am able to do an snmpwalk. I do not see it getting collected. I get the error, SnmpNodeCollector: genErr collecting data for node 172.16.30.27: Received genErr reqeusting oid .1.3.6.1.4.1.20267.200.1.1. Marking column is finished.

The SNMP version that is used on the host that runs mysql-agent is net-snmp 5.4.3. Can you please advice

InnoDB data uninitialized

I errors were variables "innodb_lsn" and "flushed_to" are initialized. Reviewing the server where I get this error I noticed that the only change is that it's using the InnoDB plugin with "Antelope" format and the SHOW ENGINE INNODB STATUS is not showing the lines:

[quote]
Log sequence number 9949124453266
Log flushed up to 9949124453266
Last checkpoint at 9949112672003
[/quote]

The difference between the servers is:

*** FAILING:
show global variables like 'innodb_file_format%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | Antelope |
+--------------------------+-----------+

*** WORKING:
show global variables like 'innodb_file_format%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | Barracuda |
+--------------------------+-----------+

Notice the difference in 'innodb_file_format_check'.

I'm wondering if initializing both variables to 0 would get rid of the issue. Please advice.

Thanks,
G

Package install on Ubuntu fails

Error on installation:

dpkg: dependency problems prevent configuration of mysql-snmp:
mysql-snmp depends on snmpd (>= 5.4.3); however:
Version of snmpd on system is 5.4.3~dfsg-2.4ubuntu1.1.
dpkg: error processing mysql-snmp (--install):
dependency problems - leaving unconfigured

Clearly the version dependency is met, but it doesn't think so. Any ideas on how to resolve this?

snmpwalk failed

After install on debian and ran snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267 got unexpected result

MIB search path: /home/tm/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-SMI): At line 26 in /usr/share/snmp/mibs/MYSQL-SERVER-MIB.txt
Did not find 'enterprises' in module #-1 (/usr/share/snmp/mibs/MYSQL-SERVER-MIB.txt)
Unlinked OID in MYSQL-SERVER-MIB: daysofwonder ::= { enterprises 20267 }
Undefined identifier: enterprises near line 61 of /usr/share/snmp/mibs/MYSQL-SERVER-MIB.txt

Slave counters do not seem to be working

Server version: 5.5.8-log MySQL Community Server (GPL)
CentOS release 5.5 (Final) (64Bit)

All installed fine...

But noticed that the Slave counters do not return accurate data.

snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267 |grep Slave

MYSQL-SERVER-MIB::mySlaveRunning.0 = Gauge32: 0
MYSQL-SERVER-MIB::mySlaveStopped.0 = Gauge32: 0
MYSQL-SERVER-MIB::mySlaveRetriedTransactions.0 = Counter32: 0
MYSQL-SERVER-MIB::mySlaveLag.0 = Gauge32: 0
MYSQL-SERVER-MIB::mySlaveOpenTempTables.0 = Gauge32: 0

Same data if slave is running or not running....

Is this a known issue?

SNMP daemon does not see output from mysql

So, set up the mysql-agent, and it appears to be running when I look at /var/log/syslog:

Dec 19 01:34:58 demo_db_primary mysql-agent[31165]: not refreshing: 136 < 300

However, running snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267

results in

MYSQL-SERVER-MIB::enterprises.20267 = No more variables left in this MIB View (It is past the end of the MIB tree)

The snmpd server has been restarted, and the snmpd.conf file contains

master agentx

and the agentx unix domain socket appears to exist:

unix 3 [ ] STREAM CONNECTED 5167574 /var/agentx/master

There are no obvious errors in /var/log/syslog.

Any idea where to start looking? I've tried scli localhost, but it just says the default MIB stuff -- nothing about agentx or the mysql-agent.

Will.

Reporting Slave I/O running

Is it possible to have the status of the "slave_io_running, beyond having 2 values for "slave_sql_running"?
I obtained it changing the "slave_stopped" variable to report it, but I don't think it's the right way of doing it.

Now I have:
$status{'slave_running'} = ($newrow{'slave_sql_running'} eq 'Yes') ? 1 : 0;
$status{'slave_stopped'} = ($newrow{'slave_io_running'} eq 'Yes') ? 0 : 1;

MIB error leaves an intermediate node unnamed

The MIB file contains this definition:

mysql
::= { enterprises 20267 200 }

This ends up defining the object:

iso.org.dod.internet.private.enterprises.(??).mySQL

Instead the line should be something like:

::= { enterprises mySQLRoot(20267) 200 }

to give a name to the intermediate node.

Another: MYSQL-SERVER-MIB::enterprises.20267 = No more variables left in this MIB View (It is past the end of the MIB tree)

is there error I get in response to issuing - just like the other issue.

snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267

Please help me learn something here so I don't have to bug peolple with such issues. I will try to include what I believe is relevant based on the previous issue of the same nature. I am working on learning what I can about SNMP and OpenNMS and this nifty mysql-snmp tool. My concerns are that this isn't installed correctly and I am not sure how to verify the install via RPM build/install I did. (Used to do Debian pkging but aside from basic install/query/update commands RMP packaging is a newer beast to me). Finally, how it becomes incorporated into OpenNMS when it is in fact installed and working correclty and how this will translate when I use it remotely (prob. be fine once it is installed correctly.) Can snmpv3 be used with mysql-snmp? Alrighty, any words from the wiser? Here's the info:

Using FC12 64-bit
net-snmp fo x86_64 5.4.2.1 is installed

Attempted to build rpm of mysql-snmp and it seems as though it built correctly and installed.

rpm --query mysql-agent

mysql-agent-1.0rc1-2.fc12.noarch
see mib installed in /etc

Ran into and cleaned up various lib dependency issues running this on the command line:

mysql-agent -h localhost -u root -p -i -v

now it runs and there is no output/errors to command line
running in non-daemon mode (see output at the end of this email...)

Added master agentX to snmpd.conf
Uncertain about what it is to add an view for enterprise - attempted it a few times but got error in /var/log/messages on snmpd.conf restart. While I successfully set up snmpv3 to work with cacti, I am not an expert, doing snmpV3 I didn't have to to a lot of work in the snmpd.conf file so I may be a bit confused here about adding this. Finally, yes, made sure to restart snmp after any snmpd.conf revisions.

snmpd.conf (just using defaults for now to test it out - would like to implement in snmpv3

if possible)

master agentx

First, map the community name "public" into a "security name"

sec.name source community

com2sec notConfigUser default public

Second, map the security name into a group name:

groupName securityModel securityName

group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

Third, create a view for us to let the group have rights to:

Make at least snmpwalk -v 1 localhost -c public system fast again.

name incl/excl subtree mask(optional)

view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1

OUTPUT: /var/log/messages (looks good and then it doesn't...?!?!)

Turning on AgentX master support.
Jun 21 15:35:54 localhost snmpd[13665]: NET-SNMP version 5.4.2.1
Jun 21 15:36:09 localhost snmpd[13665]: netsnmp_assert !"registration != duplicate" failed agent_registry.c:536 netsnmp_subtree_load()

OUTPUT: $ mysql-agent -h localhost -u root -p -i -v --no-daemon

NET-SNMP version 5.4.2.1 AgentX subagent connected
registering pdu failed: 263!
mysql-agent[13995]: enterprises.20267.200.1.1.0 -> myKeyReadRequests
enterprises.20267.200.1.1.0 -> myKeyReadRequests
mysql-agent[13995]: enterprises.20267.200.1.2.0 -> myKeyReads
enterprises.20267.200.1.2.0 -> myKeyReads
mysql-agent[13995]: enterprises.20267.200.1.3.0 -> myKeyWriteRequests
enterprises.20267.200.1.3.0 -> myKeyWriteRequests
mysql-agent[13995]: enterprises.20267.200.1.4.0 -> myKeyWrites
enterprises.20267.200.1.4.0 -> myKeyWrites
mysql-agent[13995]: enterprises.20267.200.1.5.0 -> myHistoryList
enterprises.20267.200.1.5.0 -> myHistoryList
mysql-agent[13995]: enterprises.20267.200.1.6.0 -> myInnodbTransactions
enterprises.20267.200.1.6.0 -> myInnodbTransactions
mysql-agent[13995]: enterprises.20267.200.1.7.0 -> myReadViews
enterprises.20267.200.1.7.0 -> myReadViews
mysql-agent[13995]: enterprises.20267.200.1.8.0 -> myCurrentTransactions
enterprises.20267.200.1.8.0 -> myCurrentTransactions
mysql-agent[13995]: enterprises.20267.200.1.9.0 -> myLockedTransactions
enterprises.20267.200.1.9.0 -> myLockedTransactions
mysql-agent[13995]: enterprises.20267.200.1.10.0 -> myActiveTransactions
enterprises.20267.200.1.10.0 -> myActiveTransactions
mysql-agent[13995]: enterprises.20267.200.1.11.0 -> myPoolSize
enterprises.20267.200.1.11.0 -> myPoolSize
mysql-agent[13995]: enterprises.20267.200.1.12.0 -> myFreePages
enterprises.20267.200.1.12.0 -> myFreePages
mysql-agent[13995]: enterprises.20267.200.1.13.0 -> myDatabasePages
enterprises.20267.200.1.13.0 -> myDatabasePages
mysql-agent[13995]: enterprises.20267.200.1.14.0 -> myModifiedPages
enterprises.20267.200.1.14.0 -> myModifiedPages
mysql-agent[13995]: enterprises.20267.200.1.15.0 -> myPagesRead
enterprises.20267.200.1.15.0 -> myPagesRead
mysql-agent[13995]: enterprises.20267.200.1.16.0 -> myPagesCreated
enterprises.20267.200.1.16.0 -> myPagesCreated
mysql-agent[13995]: enterprises.20267.200.1.17.0 -> myPagesWritten
enterprises.20267.200.1.17.0 -> myPagesWritten
mysql-agent[13995]: enterprises.20267.200.1.18.0 -> myFileFsyncs
.
.(more of the same above, omitted for brevity)
.
enterprises.20267.200.1.143.0 -> myThreadHashMemory
mysql-agent[13995]: Setting error to 0
Setting error to 0
mysql-agent[13995]: Refreshed at 1277149220 0
Refreshed at 1277149220 0
$VAR1 = {
'myPendingLogWrites' => {
'value' => 0,
'type' => 'Gauge32'
},
'myStateWritingToNet' => {
'value' => 0,
'type' => 'Gauge32'
.
. (more of the same above, omitted for brevity)
.
}
};

mysql-agent[13995]: not refreshing: 15 < 300
not refreshing: 15 < 300
mysql-agent[13995]: not refreshing: 30 < 300
not refreshing: 30 < 300
mysql-agent[13995]: not refreshing: 45 < 300
not refreshing: 45 < 300
mysql-agent[13995]: not refreshing: 60 < 300
not refreshing: 60 < 300
mysql-agent[13995]: not refreshing: 75 < 300
not refreshing: 75 < 300
mysql-agent[13995]: not refreshing: 91 < 300
not refreshing: 91 < 300
mysql-agent[13995]: not refreshing: 106 < 300
not refreshing: 106 < 300
mysql-agent[13995]: not refreshing: 121 < 300
not refreshing: 121 < 300
mysql-agent[13995]: not refreshing: 136 < 300
not refreshing: 136 < 300
.
. (more of the same above, omitted for brevity)

.

END

Problem snmpwalk unresponsive

Hi I am trying to configure the mysql module for SNMP monitoriarlo but not e able to complete the process below indicate that I am doing.

Step1.
I run the command (dpkg-buildpackage-uc-b-rfakeroot)
Result.
root @ ubuntu :/ usr / Programs / mysql-snmp-master # dpkg-buildpackage-uc-b-rfakeroot
dpkg-buildpackage: warning: using a command to become root ("gain-root-command '), even though it is the administrator
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor):-g-O2-fstack-protector - param = ssp-buffer-size = 4-Wformat-Wformat-security
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):-D_FORTIFY_SOURCE = 2
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor):-g-O2-fstack-protector - param = ssp-buffer-size = 4-Wformat-Wformat-security
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor):-g-O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):-Wl,-Bsymbolic-functions-Wl,-z, relro
dpkg-buildpackage: source package mysql-snmp
dpkg-buildpackage: source version 1.2-1
dpkg-buildpackage: source changed by brice [email protected]
dpkg-buildpackage: system architecture i386
dpkg-source - before-build mysql-snmp-master
fakeroot debian / rules clean
dh_testdir
dh_testroot
rm-f build-stamp configure-stamp

Add here commands to clean up after the build process.

/ Usr / bin / make DESTDIR = / usr / Programs / mysql-snmp-master / debian / mysql-snmp clean
make [1]: Entering directory '/ usr / Programs / mysql-snmp-master »
rm / usr / Programs / mysql-snmp-master / debian / mysql-snmp / usr / sbin / mysql-snmp
make [1]: Leaving directory '/ usr / Programs / mysql-snmp-master »
dh_clean
debian / rules build
dh_testdir

Add here commands to configure the package.

touch configure-stamp
dh_testdir

Add here commands to compile the package.

/ Usr / bin / make DESTDIR = / usr / Programs / mysql-snmp-master / debian / mysql-snmp build
make [1]: Entering directory '/ usr / Programs / mysql-snmp-master »
make [1]: Nothing to be done for 'build'.
make [1]: Leaving directory '/ usr / Programs / mysql-snmp-master »
touch build-stamp
fakeroot debian / rules binary
dh_testdir
dh_testroot
dh_clean-k
dh_clean: dh_clean-k is deprecated; dh_prep use instead
dh_installdirs

Add here commands to install the package into debian / mysql-snmp.

/ Usr / bin / make DESTDIR = / usr / Programs / mysql-snmp-master / debian / mysql-snmp install
make [1]: Entering directory '/ usr / Programs / mysql-snmp-master »
install-m 755 mysql-snmp / usr / Programs / mysql-snmp-master / debian / mysql-snmp / usr / sbin / mysql-snmp
MYSQL-SERV install-m 644 ER-MIB.txt / usr / Programs / mysql-snmp-master / debian / mysql-snmp / usr / share / snmp / mibs
mysql install-m 644-snmp.1 / usr/Programs/mysql-snmp-master/debian/mysql-snmp/usr/share/man/man1
gzip / usr/Programs/mysql-snmp-master/debian/mysql-snmp/usr/share/man/man1/mysql-snmp.1
make [1]: Leaving directory '/ usr / Programs / mysql-snmp-master »
mkdir-p / usr / Programs / mysql-snmp-master / debian / mysql-snmp / etc / default
install-m 0755-o root-g root debian / mysql-snmp-default / usr / Programs / mysql-snmp-master / debian / mysql-snmp / etc / default / mysql-snmp
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installinit
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_perl
dh_shlibdeps
dh_gencontrol
-gencontrol dpkg: warning: Field 'Depends' mysql-snmp package: the substitution variable $ {shlibs: Depends} is unknown
dh_md5sums
dh_builddeb
dpkg-deb: building package mysql-snmp 'in ../mysql-snmp_1.2-1_all.deb'.
dpkg-genchanges-b> ../mysql-snmp_1.2-1_i386.changes
dpkg-genchanges: binary only upload - not including any source code
dpkg-source - after-build mysql-snmp-master
dpkg-buildpackage: binary only upload (no source is not included)
¡Nuevo! Haz clic en las palabras para introducir una modificación y para ver traducciones alternativas. Ignorar
Traductor de Google para empresas:Translator ToolkitTraductor de sitios webGlobal Market Finder

Thanks for your help

missed packages

I've tried to install package on a fresh system and got:

Starting Mysql SNMP Agent: Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at /usr/sbin/mysql-snmp line 38
Can't locate DBI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/sbin/mysql-snmp line 450.
Perl script also requires modules libmath-bigint-gmp-perl, libdbd-pg-perl and libdbd-mysql-perl.
Starting Mysql SNMP Agent: Can't locate DBD/mysql.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/sbin/mysql-snmp line 451.

Fixed that by installing libmath-bigint-gmp-perl, libdbd-pg-perl and libdbd-mysql-perl packages

slave_stopped = 1 when slave_io_running or slave_sql_running is not working

Slave_stopped should be enabled when slave_io_running OR slave_sql_running is 0
Change lines to:
$status{'slave_running'} = (($newrow{'slave_sql_running'} eq 'Yes') && ($newrow{'slave_io_running'} eq 'Yes')) ? 1 : 0;
$status{'slave_stopped'} = (($newrow{'slave_sql_running'} eq 'Yes') && ($newrow{'slave_io_running'} eq 'Yes')) ? 0 : 1;

mysql-agent not registering with snmpd on MacOSX

mysql-agent is unable to register with snmpd on MacOS X

I am running snmpd as follows

snmpd -a -c /etc/snmp/snmpd.conf -m MYSQL-SERVER-MIB -f -DTOKEN -V -q

snmpwalk works for entrprises but not for
snmpwalk -m MYSQL-SERVER-MIB -v 2c -c public localhost enterprises.20267

I have run out of all ideas. Previosly I thought there was some problem with CPAN and SNMP (I cannot track it back again). I would really love to monitor mysql with snmp

strange (incorrect) values reported for Counter64 types

Choosing myTotalMemAlloc as an arbitrary Counter64 example.

The correct value (from mysql itself) is 20620520.

The value returned by SNMP walk is
MYSQL-SERVER-MIB::myTotalMemAlloc.0 = Counter64: 88564459026513920

That's a bizarre number at first glance, but in hex the two numbers are:
0x13AA4E8
0x13AA4E800000000

Using the log_debug statements that exist and adding a few more, you can see that 20620520 is correctly parsed and passed through all the way to the SNMP handler routine, up to and including this line:
$request->setValue(getASNType($global_status{$oidname}{'type'}), "$value");
Right after that, add the line
dolog(LOG_DEBUG, $request->getValue());
The output is 88564459026513920

Here is where general knowledge fails me and specific knowledge is required. It appears that NetSNMP::Agent isn't correctly handling the value passed in and is doing some very strange padding with 0s. But there may be some other oddity that is causing the problem.

Experiments with $value->numify() and $value->as_hex() were not successful.

Any ideas would be appreciated.

Linux 2.6.32-318-ec2 #38-Ubuntu SMP Thu Sep 1 18:09:30 UTC 2011 x86_64 GNU/Linux
perl v5.10.1 (*) built for x86_64-linux-gnu-thread-multi

typo in init.d

A typo in the file debian/init.d used to construct the debian package results in a flawed installation when installed using dpkg. In particular, /etc/init.d/mysql-snmp quietly dies without an error message.

The fix is to change line 28 from
DAEMON=/usr/sbin/mysql-smnp
to
DAEMON=/usr/sbin/mysql-snmp

-Mike

does not work on 64Bit machines :(

I am always getting:

2010-02-10 18:03:57,369 WARN [DefaultUDPTransportMapping_127.0.0.1/0] SnmpNodeCollector: genErr collecting data for node 192.168.1.1: Received genErr reqeusting oid .1.3.6.1.4.1.20267.200.1.1. Marking column is finished.

Typos and wrong conditions

Debian, mysql-snmp v1.2_01

  1. Typo in /etc/init.d/mysql-snmp
    DAEMON=/usr/sbin/mysql-smnp
  2. /usr/sbin/mysql-snmp, line 776: if ($opt{innodb} && $status{'have_innodb'} eq 'YES')
    $status{'have_innodb'} is unset so the agent doesn't create any OIDs with "SHOW ENGINE INNODB STATUS" metrics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.