Using snmpgetnext vs snmpgetnext (SQL Server 2000 snmp)

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
amccool
Posts: 17
Joined: Mon Apr 18, 2005 4:27 pm

Using snmpgetnext vs snmpgetnext (SQL Server 2000 snmp)

Post by amccool »

I am working toward getting ms sql to deliver data for graphing and need to use snmpgetnext

How do I utilize snmpgetnext rather than the standard snmpget?

There are many threads stating how mssql's snmp wont return data when using snmpget, however, snmpgetnext does work.

I noticed that in the configuration->settings->paths there is a binary location for calling snmpgetnext. However, I dont see which Data Query or Data Template can utilize this call.

Can anyone point me in the right direction? I should have thought someone would have written the snmp generic OID script to call snmpgetnext.

BTW this is on a debian box so WMI is out.

Thanks,
Alex
Last edited by amccool on Tue Sep 26, 2006 12:56 pm, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well, unfortunately, we don't have a function for the snmpgetnext, although we are asking for this (due to MacTrack). So, I wrote all of MacTrack and some of Cacti, so I guess my enhancements make it quicker.

So, your solution is to use a script rather than an snmp query. This will resolve your problem. If it's snmp data query (table based), the you run a script query, otherwise, simply run a script.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
amccool
Posts: 17
Joined: Mon Apr 18, 2005 4:27 pm

oh my bleeding edge

Post by amccool »

Thanks, I appreciate the effort. I kinda figured that might be the case, so I'm about half way done with a script for it. The major bummer is the snmp isn't really indexed, so I have to do it in a custom fashion :-?

If you get a chance post back to let me know which version is going to be getting the snmpgetnext functionality.

Thanks,
Alex
User avatar
amccool
Posts: 17
Joined: Mon Apr 18, 2005 4:27 pm

Post by amccool »

I wrote a small perl script using snmpgetnext to query on hosts

Its working rather well. No doubt that some cleanup would be good, but I thought that people may want to start graphing sql server snmp from linux sooner than later
Attachments
SQL_STATS.pl
script to query sql server 2000 SNMP using snmp->get_next_request
(1.06 KiB) Downloaded 569 times
cacti_graph_template_sql_blocking.xml
SQL Blocking graph
(13.59 KiB) Downloaded 301 times
cacti_graph_template_sql_users_and_locks.xml
SQL user connections and locks graph
(13.59 KiB) Downloaded 311 times
cacti_graph_template_ssqlstats.xml
sql server combined graph
(18.4 KiB) Downloaded 350 times
Crackerjack
Posts: 2
Joined: Tue Oct 24, 2006 4:31 pm

still not working :-(

Post by Crackerjack »

I tried using these configs and they seem to be half working... for some reason, the spaces between the commandline parameters were lost, so I had to go in and add them back. All the graphs come back with everything as "nan"... but when I run the script manually, this is what I get:

UserConnections: 228 TotalLocks:212 TotalBlockingLocks:1 UsersBlocked:1

so it looks like the script is doing its job, but the information just doesnt flow back to cacti properly? has anybody gotten this to work?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You have a space between "UserConnections:" and "228". That won't work.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Crackerjack
Posts: 2
Joined: Tue Oct 24, 2006 4:31 pm

Post by Crackerjack »

well, i don't *actually* have a space there, i was typing what i was reading on the other monitor, sorry. :)

another oddity is that the "5 minute average daily" graph shows "week 31, week 32', etc... very confusing :(
User avatar
amccool
Posts: 17
Joined: Mon Apr 18, 2005 4:27 pm

the daily, weekly, monthly graphs

Post by amccool »

I ran into the same issue with daily, weekly graphs showing the monthlies

its not related to the script and template, buyt due to a cacti upgrade problem

Luckily, It's easily fixed

go to console, datasources, --RRA and correct to taste (see attached)
Attachments
cacti.JPG
cacti.JPG (103.16 KiB) Viewed 5635 times
WimanX
Posts: 4
Joined: Wed Jan 17, 2007 3:57 am

Post by WimanX »

I dont get the graph to work, only showing "nan" as values

Error in the cacti log file:
CMDPHP: Poller[0] ERROR: SQL Exec Failed "delete from data_input_data where data_input_id=14"

have installed the xml's and copied the SQL_STATS.PL to the correct path

please advice

Edit:
Its against a SQL2003 server
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Do you actually have the Microsoft Agent Extensions loaded. AKA, have you confirmed that the host responds to the correct MIBS?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
WimanX
Posts: 4
Joined: Wed Jan 17, 2007 3:57 am

Post by WimanX »

TheWitness wrote:Do you actually have the Microsoft Agent Extensions loaded. AKA, have you confirmed that the host responds to the correct MIBS?

TheWitness
the SNMP Service is up and running, all the other graphs are working fine...

I installed the NET::SNMP perl and then i get another error
"CMDPHP: Poller[0] Host[33] DS[890] WARNING: Result from CMD not valid. Partial Result: ERROR: Community not"

Guess that the comminity is not valid, but what about the other graphs that are working fine...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You might have a separate community required for that section of the agent. I don't know. I've never used it.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
igonzalez
Posts: 3
Joined: Sat Jan 20, 2007 3:59 am

Post by igonzalez »

I'm getting nan values as well with the following error in the cacti logs:

CMDPHP: Poller[0] Host[11] DS[114] WARNING: Result from CMD not valid. Partial Result: ERROR: Community not

I imported the templates and verfied that the perl script is running from the command line.

any ideas how to fix this?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests