Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Post by browniebraun »

Current version (0.2.3) of SNMPAgent can be downloaded >>HERE<<

Dear Cacti Community,

I'm happy to release the initial version of a new plugin called "Cacti SNMPagent" today.
All in all it is a pretty small base plugin, that allows you to monitor Cacti on its own or by using a foreign application in combination with SNMP. Therefore Cacti got its own MIB.
I'm pretty sure that some of you will directly notice that this initial release does not support SNMP notifications as well as other Cacti plugins.
This will be part of the second release I'm currently working on.
From my point of view BOOST and THOLD are the most interesting plugins in that case and I will write an additional MIB for both of them after consultation with the other core developers.

However, I'm looking for your specific feedback on this plugin and probably some of you will have a good mind to create some sweet templates for it.
One example has already been included.

Best regards
-Browniebraun

Code: Select all

browniebraun@ubuntudevbox:~$  snmpwalk -v 2c -c cacti_get localhost -m CACTI-SMI .1.3.6.1.4.1.23925
CACTI-SMI::cactiApplLastUpdate.0 = Gauge32: 1361994605 seconds
CACTI-SMI::cactiApplVersion.0 = STRING: 0.8.8a
CACTI-SMI::cactiApplSnmpVersion.0 = INTEGER: netsnmp(1)
CACTI-SMI::cactiApplRrdtoolVersion.0 = STRING: rrd-1.4.x
CACTI-SMI::cactiApplPollerEnabled.0 = INTEGER: true(1)
CACTI-SMI::cactiApplPollerType.0 = INTEGER: cmd(1)
CACTI-SMI::cactiApplPollerInterval.0 = Gauge32: 300 seconds
CACTI-SMI::cactiApplPollerMaxProcesses.0 = Gauge32: 2 processes
CACTI-SMI::cactiApplPollerLoadBalance.0 = INTEGER: true(1)
CACTI-SMI::cactiApplSpineMaxThreads.0 = Gauge32: 1 threads
CACTI-SMI::cactiApplSpineScriptServers.0 = Gauge32: 1 instances
CACTI-SMI::cactiApplSpineScriptTimeout.0 = Gauge32: 25 seconds
CACTI-SMI::cactiApplSpineMaxOids.0 = Gauge32: 10 oids
CACTI-SMI::cactiApplDeviceIndex.1 = Gauge32: 1
CACTI-SMI::cactiApplDeviceIndex.3 = Gauge32: 3
CACTI-SMI::cactiApplDeviceIndex.7 = Gauge32: 7
CACTI-SMI::cactiApplDeviceIndex.8 = Gauge32: 8
CACTI-SMI::cactiApplDeviceIndex.9 = Gauge32: 9
CACTI-SMI::cactiApplDeviceIndex.10 = Gauge32: 10
CACTI-SMI::cactiApplDeviceIndex.13 = Gauge32: 13
CACTI-SMI::cactiApplDeviceDescription.1 = STRING: VM Ubuntu Enterprise Server
CACTI-SMI::cactiApplDeviceDescription.3 = STRING: Draytek
CACTI-SMI::cactiApplDeviceDescription.7 = STRING: Netgear GS108Tv2
CACTI-SMI::cactiApplDeviceDescription.8 = STRING: Netgear GS108Tv1
CACTI-SMI::cactiApplDeviceDescription.9 = STRING: TP-LINK AP 901
CACTI-SMI::cactiApplDeviceDescription.10 = STRING: Brother HL-2250DN
CACTI-SMI::cactiApplDeviceDescription.13 = STRING: VM Windows Host
CACTI-SMI::cactiApplDeviceHostname.1 = STRING: 127.0.0.1
CACTI-SMI::cactiApplDeviceHostname.3 = STRING: 192.168.1.1
CACTI-SMI::cactiApplDeviceHostname.7 = STRING: 192.168.1.3
CACTI-SMI::cactiApplDeviceHostname.8 = STRING: 192.168.1.2
CACTI-SMI::cactiApplDeviceHostname.9 = STRING: 192.168.1.254
CACTI-SMI::cactiApplDeviceHostname.10 = STRING: 192.168.1.15
CACTI-SMI::cactiApplDeviceHostname.13 = STRING: 192.168.1.50
CACTI-SMI::cactiApplDeviceStatus.1 = INTEGER: up(3)
CACTI-SMI::cactiApplDeviceStatus.3 = INTEGER: down(1)
CACTI-SMI::cactiApplDeviceStatus.7 = INTEGER: up(3)
CACTI-SMI::cactiApplDeviceStatus.8 = INTEGER: up(3)
CACTI-SMI::cactiApplDeviceStatus.9 = INTEGER: up(3)
CACTI-SMI::cactiApplDeviceStatus.10 = INTEGER: up(3)
CACTI-SMI::cactiApplDeviceStatus.13 = INTEGER: unknown(0)
CACTI-SMI::cactiApplDeviceEventCount.1 = Gauge32: 0
CACTI-SMI::cactiApplDeviceEventCount.3 = Gauge32: 3873
CACTI-SMI::cactiApplDeviceEventCount.7 = Gauge32: 0
CACTI-SMI::cactiApplDeviceEventCount.8 = Gauge32: 0
CACTI-SMI::cactiApplDeviceEventCount.9 = Gauge32: 0
CACTI-SMI::cactiApplDeviceEventCount.10 = Gauge32: 0
CACTI-SMI::cactiApplDeviceEventCount.13 = Gauge32: 0
CACTI-SMI::cactiApplDeviceFailDate.1 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.3 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.7 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.8 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.9 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.10 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceFailDate.13 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.1 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.3 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.7 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.8 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.9 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.10 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceRecoveryDate.13 = STRING: 0000-00-00 00:00:00
CACTI-SMI::cactiApplDeviceLastError.1 = STRING: Host did not respond to SNMP
CACTI-SMI::cactiApplDeviceLastError.3 = STRING: Host did not respond to SNMP
CACTI-SMI::cactiApplDeviceLastError.7 = STRING:
CACTI-SMI::cactiApplDeviceLastError.8 = STRING:
CACTI-SMI::cactiApplDeviceLastError.9 = STRING:
CACTI-SMI::cactiApplDeviceLastError.10 = STRING: Host did not respond to SNMP
CACTI-SMI::cactiApplDeviceLastError.13 = STRING:
CACTI-SMI::cactiApplPollerIndex.1 = Gauge32: 1
CACTI-SMI::cactiApplPollerHostname.1 = STRING: localhost
CACTI-SMI::cactiApplPollerIpAddress.1 = STRING: 127.0.0.1
CACTI-SMI::cactiApplPollerLastUpdate.1 = STRING: 1359307502
CACTI-SMI::cactiApplPluginIndex.1 = Gauge32: 1
CACTI-SMI::cactiApplPluginIndex.2 = Gauge32: 2
CACTI-SMI::cactiApplPluginIndex.3 = Gauge32: 3
CACTI-SMI::cactiApplPluginIndex.4 = Gauge32: 4
CACTI-SMI::cactiApplPluginType.1 = INTEGER: system(1)
CACTI-SMI::cactiApplPluginType.2 = INTEGER: system(1)
CACTI-SMI::cactiApplPluginType.3 = INTEGER: default(2)
CACTI-SMI::cactiApplPluginType.4 = INTEGER: default(2)
CACTI-SMI::cactiApplPluginName.1 = STRING: snmpagent
CACTI-SMI::cactiApplPluginName.2 = STRING: settings
CACTI-SMI::cactiApplPluginName.3 = STRING: weathermap
CACTI-SMI::cactiApplPluginName.4 = STRING: evolution
CACTI-SMI::cactiApplPluginStatus.1 = INTEGER: active(1)
CACTI-SMI::cactiApplPluginStatus.2 = INTEGER: installed(4)
CACTI-SMI::cactiApplPluginStatus.3 = INTEGER: disabledold(-2)
CACTI-SMI::cactiApplPluginStatus.4 = INTEGER: notinstalled(0)
CACTI-SMI::cactiApplPluginVersion.1 = STRING: 0.1
CACTI-SMI::cactiApplPluginVersion.2 = STRING: 0.71
CACTI-SMI::cactiApplPluginVersion.3 = STRING: 0.97a
CACTI-SMI::cactiApplPluginVersion.4 = STRING: 0.1
CACTI-SMI::cactiStatsLastUpdate.0 = Gauge32: 1361994605 seconds
CACTI-SMI::cactiStatsRecacheTime.0 = Gauge32: 0 seconds
CACTI-SMI::cactiStatsRecachedHosts.0 = Gauge32: 0
CACTI-SMI::cactiStatsLocalPollerRuntime.0 = STRING: 3.1879 seconds
CACTI-SMI::cactiStatsTotalsDevices.0 = Gauge32: 7
CACTI-SMI::cactiStatsTotalsDataSources.0 = Gauge32: 32
CACTI-SMI::cactiStatsTotalsGraphs.0 = Gauge32: 24
CACTI-SMI::cactiStatsTotalsDeviceStatusIndex.unknown = INTEGER: unknown(0)
CACTI-SMI::cactiStatsTotalsDeviceStatusIndex.down = INTEGER: down(1)
CACTI-SMI::cactiStatsTotalsDeviceStatusIndex.recovering = INTEGER: recovering(2)
CACTI-SMI::cactiStatsTotalsDeviceStatusIndex.up = INTEGER: up(3)
CACTI-SMI::cactiStatsTotalsDeviceStatusIndex.disabled = INTEGER: disabled(4)
CACTI-SMI::cactiStatsTotalsDeviceStatusCounter.unknown = Gauge32: 1
CACTI-SMI::cactiStatsTotalsDeviceStatusCounter.down = Gauge32: 1
CACTI-SMI::cactiStatsTotalsDeviceStatusCounter.recovering = Gauge32: 0
CACTI-SMI::cactiStatsTotalsDeviceStatusCounter.up = Gauge32: 5
CACTI-SMI::cactiStatsTotalsDeviceStatusCounter.disabled = Gauge32: 0
CACTI-SMI::cactiStatsDeviceIndex.1 = Gauge32: 1
CACTI-SMI::cactiStatsDeviceIndex.3 = Gauge32: 3
CACTI-SMI::cactiStatsDeviceIndex.7 = Gauge32: 7
CACTI-SMI::cactiStatsDeviceIndex.8 = Gauge32: 8
CACTI-SMI::cactiStatsDeviceIndex.9 = Gauge32: 9
CACTI-SMI::cactiStatsDeviceIndex.10 = Gauge32: 10
CACTI-SMI::cactiStatsDeviceIndex.13 = Gauge32: 13
CACTI-SMI::cactiStatsDeviceHostname.1 = STRING: 127.0.0.1
CACTI-SMI::cactiStatsDeviceHostname.3 = STRING: 192.168.1.1
CACTI-SMI::cactiStatsDeviceHostname.7 = STRING: 192.168.1.3
CACTI-SMI::cactiStatsDeviceHostname.8 = STRING: 192.168.1.2
CACTI-SMI::cactiStatsDeviceHostname.9 = STRING: 192.168.1.254
CACTI-SMI::cactiStatsDeviceHostname.10 = STRING: 192.168.1.15
CACTI-SMI::cactiStatsDeviceHostname.13 = STRING: 192.168.1.50
CACTI-SMI::cactiStatsDeviceMinTime.1 = STRING: 0.07000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.3 = STRING: 7.17000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.7 = STRING: 6.53000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.8 = STRING: 7.03000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.9 = STRING: 4.90000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.10 = STRING: 5.06000 milliseconds
CACTI-SMI::cactiStatsDeviceMinTime.13 = STRING: 9.99999 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.1 = STRING: 40.31000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.3 = STRING: 64.82000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.7 = STRING: 87.15000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.8 = STRING: 193.36000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.9 = STRING: 175.94000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.10 = STRING: 85.11000 milliseconds
CACTI-SMI::cactiStatsDeviceMaxTime.13 = STRING: 0.00000 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.1 = STRING: 21.18 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.3 = STRING: 30.33000 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.7 = STRING: 16.6 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.8 = STRING: 14.95 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.9 = STRING: 13.91 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.10 = STRING: 22.83 milliseconds
CACTI-SMI::cactiStatsDeviceCurTime.13 = STRING: 0.00000 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.1 = STRING: 4.6414624542429 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.3 = STRING: 19.76352 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.7 = STRING: 13.103881423326 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.8 = STRING: 12.688725465991 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.9 = STRING: 18.995640591012 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.10 = STRING: 17.304720375751 milliseconds
CACTI-SMI::cactiStatsDeviceAvgTime.13 = STRING: 0.00000 milliseconds
CACTI-SMI::cactiStatsDeviceTotalPolls.1 = Gauge32: 3051
CACTI-SMI::cactiStatsDeviceTotalPolls.3 = Gauge32: 7421
CACTI-SMI::cactiStatsDeviceTotalPolls.7 = Gauge32: 5719
CACTI-SMI::cactiStatsDeviceTotalPolls.8 = Gauge32: 5719
CACTI-SMI::cactiStatsDeviceTotalPolls.9 = Gauge32: 5719
CACTI-SMI::cactiStatsDeviceTotalPolls.10 = Gauge32: 5716
CACTI-SMI::cactiStatsDeviceTotalPolls.13 = Gauge32: 0
CACTI-SMI::cactiStatsDeviceFailedPolls.1 = Gauge32: 647
CACTI-SMI::cactiStatsDeviceFailedPolls.3 = Gauge32: 3886
CACTI-SMI::cactiStatsDeviceFailedPolls.7 = Gauge32: 0
CACTI-SMI::cactiStatsDeviceFailedPolls.8 = Gauge32: 0
CACTI-SMI::cactiStatsDeviceFailedPolls.9 = Gauge32: 0
CACTI-SMI::cactiStatsDeviceFailedPolls.10 = Gauge32: 553
CACTI-SMI::cactiStatsDeviceFailedPolls.13 = Gauge32: 0
CACTI-SMI::cactiStatsDeviceAvailability.1 = STRING: 78.793838085873 percent
CACTI-SMI::cactiStatsDeviceAvailability.3 = STRING: 47.635089610565 percent
CACTI-SMI::cactiStatsDeviceAvailability.7 = STRING: 100 percent
CACTI-SMI::cactiStatsDeviceAvailability.8 = STRING: 100 percent
CACTI-SMI::cactiStatsDeviceAvailability.9 = STRING: 100 percent
CACTI-SMI::cactiStatsDeviceAvailability.10 = STRING: 90.325402379286 percent
CACTI-SMI::cactiStatsDeviceAvailability.13 = STRING: 100.00000 percent
CACTI-SMI::cactiStatsPollerIndex.1 = Gauge32: 1
CACTI-SMI::cactiStatsPollerHostname.1 = STRING: localhost
CACTI-SMI::cactiStatsPollerRunTime.1 = STRING: 3.1879 seconds
CACTI-SMI::cactiStatsPollerMethod.1 = INTEGER: cmd(1)
CACTI-SMI::cactiStatsPollerConcurrentProcesses.1 = Gauge32: 2
CACTI-SMI::cactiStatsPollerThreads.1 = Gauge32: 0
CACTI-SMI::cactiStatsPollerHosts.1 = Gauge32: 8
CACTI-SMI::cactiStatsPollerHostsPerProcess.1 = Gauge32: 4
CACTI-SMI::cactiStatsPollerItems.1 = Gauge32: 49
CACTI-SMI::cactiStatsPollerRrrdsProcessed.1 = Gauge32: 27
CACTI-SMI::cactiStatsPollerUtilization.1 = STRING: 1.0626333333 percent
browniebraun@ubuntudevbox:~$
Attachments
snmpagent.zip
v0.1
(1.28 MiB) Downloaded 491 times
snmpagent.tar.gz
v0.1
(1.27 MiB) Downloaded 475 times
manual.pdf
Manual
(1.25 MiB) Downloaded 705 times
CACTI-SMI.txt
Cacti MIB
(31.68 KiB) Downloaded 463 times
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPagent 0.1 - Released

Post by browniebraun »

Two examples showing the poller runtime and the poller utilization.
The poller utilization will be calculated in relation to the configured poller interval at the bottom of every polling cycle.

Regards
-Andi
Attachments
poller utilization
poller utilization
graph_image-2.png (13.06 KiB) Viewed 18436 times
poller runtime
poller runtime
graph_image_1.png (14.26 KiB) Viewed 18436 times
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
victorantunes
Cacti User
Posts: 111
Joined: Fri Sep 28, 2012 6:52 pm

Re: Cacti SNMPagent 0.1 - Released

Post by victorantunes »

that's pretty interesting

I can see the advantages of owning more than one NMS solution, and one being able to effectively monitor the other and thus give the user the ability to better troubleshoot discrepancies on data
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Cacti SNMPagent 0.1 - Released

Post by Atreides »

Hello,
I'm trying to install this plugin and I'm a bit stucked, I'd appreciate some help. I see that there's a CACTI-SMI file, where should I put that, because I'm having the following error(prolly because of that file missing) :

snmpwalk -v 2c -c cacti_get localhost -m CACTI-SMI .1.3.6.1.4.1.23925
No log handling enabled - turning on stderr logging
Cannot find module (CACTI-SMI): At line 0 in (none)
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPagent 0.1 - Released

Post by browniebraun »

Atreides wrote:Hello,
I'm trying to install this plugin and I'm a bit stucked, I'd appreciate some help. I see that there's a CACTI-SMI file, where should I put that, because I'm having the following error(prolly because of that file missing) :

snmpwalk -v 2c -c cacti_get localhost -m CACTI-SMI .1.3.6.1.4.1.23925
No log handling enabled - turning on stderr logging
Cannot find module (CACTI-SMI): At line 0 in (none)
It depends on your local setup of net-snmp where a copy of that MIB file has to be stored. At least you do not need the option "-m CACTI-SMI" to run a query against the local snmp agent.
I'm so sorry, that I haven't released the next version of this plugin so far. Currently I'm totally busy with the extension of our house without having real free time for programming during the last 2 months.
However, 90% of the new version are ready and the lasted SVN commit is quite stable. I've completely rewritten the persistent script and added functions to maintain the SNMPcache easier. Other Cacti plugin are allowed to hook into the SNMPagent to make their own MIB data available. Under Utilities you can also take a look at the SNMPcache or trigger a rebuild if necessary.
I've already written a MIB for Thold and Boost in the meanwhile. And after I'll have added the last 10% of SNMP trap handling I will release the new version and probably a mod of THOLD.
Need to discuss that with Jimmy first.

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Hanseat
Posts: 17
Joined: Thu Sep 27, 2012 5:24 am

Re: Cacti SNMPAgent - v0.2.0 (released 08/Feb/14)

Post by Hanseat »

Hi Andi,

this looks like an awesome addition and I can see a lot of usefulness! My primary interest would be trending "Host polling times";
as in: how much time did a poller spend on each host. I know the medium debug information has an output of "Total Time" but
polling via SNMP instead of parsing log files would be way nicer.

Please let me know if this would be possible in future releases!

Cheers and greetings from Hamburg,
Andre
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.1 (released 06/May/14)

Post by browniebraun »

Please note,
I've just release v0.2.1 fixing a handful of minor bugs occurring in strict mode.
Have fun and enjoy Cacti SNMPAgent!

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.2 (released 24/July/14)

Post by browniebraun »

Dear Community,
Today I released a new minor version of the Cacti SNMPAgent plugin.
The agent of this release will perform extremely better on mid-size / hugh Cacti environments. ( My environment: >2300 host, >190K data source items)

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.2 (released 24/July/14)

Post by browniebraun »

Just a note for all of you who would like to use the Cacti SNMPAgent 0.2.2 together with Cacti 0.8.8c:

All new hooks required for this plugin became part of the Cacti core. Patches are not required.

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Cacti SNMPAgent - v0.2.2 (released 24/July/14)

Post by Atreides »

Hello Brownie,
Is there a manual on howto config/use this plugin ?. I got it, installed it from plugin management tab, but except a "notification" tab nothing seem to happen.
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.2 (released 24/July/14)

Post by browniebraun »

The manual is part of the download package. Take a look at /plugins/snmpagent/docs/manual.pdf.
Additionally you can review the utilities for SNMPAgent under "Console->System Utilities".

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
kaf3773
Posts: 22
Joined: Sun Sep 09, 2012 8:48 pm

Re: Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Post by kaf3773 »

Hello browniebraun

I have installed snmpagent plugin but i am unable to snmpwalk the Cacti MIB's after following the manual. Results of my snmpwalk below

Code: Select all

root@websvr2:/usr/share/cacti/site/plugins/snmpagent# snmpwalk -m +CACTI-MIB -v2c -c public localhost .1.3.6.1.4.1.23925
CACTI-MIB::cacti = No more variables left in this MIB View (It is past the end of the MIB tree)
root@websvr2:/usr/share/cacti/site/plugins/snmpagent# snmpwalk -m +CACTI-SMI -v2c -c public localhost .1.3.6.1.4.1.23925
CACTI-SMI::cacti = No more variables left in this MIB View (It is past the end of the MIB tree)
Also in the SNMPAgent Cache under Utilities all the items show up there correctly but when i also look in the cacti logs i dont see anything there for snmpagent.

Secondly does the MIB setup or persist.php script setup in snmpd.conf need to be working before snmptraps can be sent successfully?

Your help will be very much appreciated.

Thanks
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Post by browniebraun »

Let me start with your second question:
There is no relationship between the SNMP trap feature and the persistent daemon.
You only have to define the path to the snmptrap binary and to setup your notification receivers.

If the snmpd.conf has been setup correctly and the net-snmp process has been restarted, you should see two additional
processes running after your first SNMP walk/get or bulkget request against the private enterprise ID of Cacti:

a) persist.php (this process responds to requests coming from Net-SNMP internally)
b) mibcache.php (this process refreshes the mibcache being used by the persistent daemon in the background once a change has been detected)

If persist.php is not running then there is something going wrong with your configuration in most cases.
You can also start the persistent.php script manually to verify that the mibcache will be build up correctly.

<path_to_php> persistent.php
Type in "PING" (upper case!) + Enter and the script will answer with "PONG". After that type in "debug" + Enter and the script should return the complete content of the mibcache. Additionally a temporary file called "mibache.tmp" will have been automatically being created in subfolder "/snmpagent/tmp/".

Regards
-Andi
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
oramirez
Posts: 1
Joined: Mon Mar 28, 2016 9:19 am

Re: Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Post by oramirez »

Hi Browniebraun,

I am currently using Cacti 0.8.8g on CentOS. I managed to follow the instructions and got the following error:

Code: Select all

pass_persist .1.3.6.1.4.1.23925 /usr/share/webapps/cacti/plugins/snmpagent/persist.php
Take a look at the bottom of my log. I am only able to run the snmpwalk one time, after that I get a constantly Timeout: No Response from localhost.

Is there a way to troubleshoot why suddenly is just get a Timeout: No Response from localhost?

If I remove the pass_persist, everything works fine.

===========
[root@gpu-dh-95 thold]# snmpwalk -v2c -c dcbread localhost -m CACTI-MIB .1.3.6.1.4.1.23925
CACTI-MIB::cactiApplLastUpdate.0 = Gauge32: 1459194242 seconds
CACTI-MIB::cactiApplVersion.0 = STRING: 0.8.8g
CACTI-MIB::cactiApplSnmpVersion.0 = INTEGER: phpsnmp(3)
CACTI-MIB::cactiApplRrdtoolVersion.0 = STRING: rrd-1.4.x
CACTI-MIB::cactiApplPollerEnabled.0 = INTEGER: true(1)
CACTI-MIB::cactiApplPollerType.0 = INTEGER: spine(2)
CACTI-MIB::cactiApplPollerInterval.0 = Gauge32: 60 seconds
CACTI-MIB::cactiApplPollerMaxProcesses.0 = Gauge32: 1 processes
CACTI-MIB::cactiApplPollerLoadBalance.0 = INTEGER: true(1)
CACTI-MIB::cactiApplSpineMaxThreads.0 = Gauge32: 8 threads
CACTI-MIB::cactiApplSpineScriptServers.0 = Gauge32: 4 instances
CACTI-MIB::cactiApplSpineScriptTimeout.0 = Gauge32: 25 seconds
CACTI-MIB::cactiApplSpineMaxOids.0 = Gauge32: 10 oids
CACTI-MIB::cactiApplDeviceIndex.1 = Gauge32: 1
CACTI-MIB::cactiApplDeviceIndex.2 = Gauge32: 2
CACTI-MIB::cactiApplDeviceIndex.3 = Gauge32: 3
CACTI-MIB::cactiApplDeviceDescription.1 = STRING: Localhost
CACTI-MIB::cactiApplDeviceDescription.2 = STRING: ATA Router
CACTI-MIB::cactiApplDeviceDescription.3 = STRING: Jenkins
CACTI-MIB::cactiApplDeviceHostname.1 = STRING: 127.0.0.1
CACTI-MIB::cactiApplDeviceHostname.2 = STRING: 128.100.102.102
CACTI-MIB::cactiApplDeviceHostname.3 = STRING: 128.100.102.226
CACTI-MIB::cactiApplDeviceStatus.1 = INTEGER: up(3)
CACTI-MIB::cactiApplDeviceStatus.2 = INTEGER: up(3)
CACTI-MIB::cactiApplDeviceStatus.3 = INTEGER: up(3)
CACTI-MIB::cactiApplDeviceEventCount.1 = Gauge32: 0
CACTI-MIB::cactiApplDeviceEventCount.2 = Gauge32: 0
CACTI-MIB::cactiApplDeviceEventCount.3 = Gauge32: 0
CACTI-MIB::cactiApplDeviceFailDate.1 = STRING: 0000-00-00 00:00:00
CACTI-MIB::cactiApplDeviceFailDate.2 = STRING: 2016-03-24 03:00:00
CACTI-MIB::cactiApplDeviceFailDate.3 = STRING: 0000-00-00 00:00:00
CACTI-MIB::cactiApplDeviceRecoveryDate.1 = STRING: 0000-00-00 00:00:00
CACTI-MIB::cactiApplDeviceRecoveryDate.2 = STRING: 0000-00-00 00:00:00
CACTI-MIB::cactiApplDeviceRecoveryDate.3 = STRING: 0000-00-00 00:00:00
CACTI-MIB::cactiApplDeviceLastError.1 = STRING:
CACTI-MIB::cactiApplDeviceLastError.2 = STRING: Host did not respond to SNMP
CACTI-MIB::cactiApplDeviceLastError.3 = STRING:
CACTI-MIB::cactiApplPollerIndex.1 = Gauge32: 1
CACTI-MIB::cactiApplPollerHostname.1 = STRING: localhost
CACTI-MIB::cactiApplPollerIpAddress.1 = STRING: 127.0.0.1
CACTI-MIB::cactiApplPollerLastUpdate.1 = STRING: 1459190942
CACTI-MIB::cactiApplPluginIndex.1 = Gauge32: 1
CACTI-MIB::cactiApplPluginIndex.2 = Gauge32: 2
CACTI-MIB::cactiApplPluginIndex.3 = Gauge32: 3
CACTI-MIB::cactiApplPluginIndex.4 = Gauge32: 4
CACTI-MIB::cactiApplPluginIndex.5 = Gauge32: 5
CACTI-MIB::cactiApplPluginType.1 = INTEGER: system(1)
CACTI-MIB::cactiApplPluginType.2 = INTEGER: system(1)
CACTI-MIB::cactiApplPluginType.3 = INTEGER: system(1)
CACTI-MIB::cactiApplPluginType.4 = INTEGER: default(2)
CACTI-MIB::cactiApplPluginType.5 = INTEGER: default(2)
CACTI-MIB::cactiApplPluginName.1 = STRING: snmpagent
CACTI-MIB::cactiApplPluginName.2 = STRING: dsstats
CACTI-MIB::cactiApplPluginName.3 = STRING: settings
CACTI-MIB::cactiApplPluginName.4 = STRING: nectar
CACTI-MIB::cactiApplPluginName.5 = STRING: thold
CACTI-MIB::cactiApplPluginStatus.1 = INTEGER: active(1)
CACTI-MIB::cactiApplPluginStatus.2 = INTEGER: active(1)
CACTI-MIB::cactiApplPluginStatus.3 = INTEGER: active(1)
CACTI-MIB::cactiApplPluginStatus.4 = INTEGER: notinstalled(0)
CACTI-MIB::cactiApplPluginStatus.5 = INTEGER: notinstalled(0)
CACTI-MIB::cactiApplPluginVersion.1 = STRING: 0.2.3
CACTI-MIB::cactiApplPluginVersion.2 = STRING: 1.4
CACTI-MIB::cactiApplPluginVersion.3 = STRING: 0.71
CACTI-MIB::cactiApplPluginVersion.4 = STRING: 0.11
CACTI-MIB::cactiApplPluginVersion.5 = STRING: 0.6
CACTI-MIB::cactiStatsLastUpdate.0 = Gauge32: 1459194242 seconds
CACTI-MIB::cactiStatsRecacheTime.0 = Gauge32: 0 seconds
CACTI-MIB::cactiStatsRecachedHosts.0 = Gauge32: 0
CACTI-MIB::cactiStatsLocalPollerRuntime.0 = STRING: 0.1109 seconds
CACTI-MIB::cactiStatsTotalsDevices.0 = Gauge32: 3
CACTI-MIB::cactiStatsTotalsDataSources.0 = Gauge32: 13
CACTI-MIB::cactiStatsTotalsGraphs.0 = Gauge32: 11
CACTI-MIB::cactiStatsTotalsDeviceStatusIndex.unknown = INTEGER: unknown(0)
CACTI-MIB::cactiStatsTotalsDeviceStatusIndex.down = INTEGER: down(1)
CACTI-MIB::cactiStatsTotalsDeviceStatusIndex.recovering = INTEGER: recovering(2)
CACTI-MIB::cactiStatsTotalsDeviceStatusIndex.up = INTEGER: up(3)
CACTI-MIB::cactiStatsTotalsDeviceStatusIndex.disabled = INTEGER: disabled(4)
CACTI-MIB::cactiStatsTotalsDeviceStatusCounter.unknown = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusCounter.down = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusCounter.recovering = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusCounter.up = Gauge32: 3
CACTI-MIB::cactiStatsTotalsDeviceStatusCounter.disabled = Gauge32: 0
CACTI-MIB::cactiStatsDeviceIndex.1 = Gauge32: 1
CACTI-MIB::cactiStatsDeviceIndex.2 = Gauge32: 2
CACTI-MIB::cactiStatsDeviceIndex.3 = Gauge32: 3
CACTI-MIB::cactiStatsDeviceHostname.1 = STRING: 127.0.0.1
CACTI-MIB::cactiStatsDeviceHostname.2 = STRING: 128.100.102.102
CACTI-MIB::cactiStatsDeviceHostname.3 = STRING: 128.100.102.226
CACTI-MIB::cactiStatsDeviceMinTime.1 = STRING: 0.03386 milliseconds
CACTI-MIB::cactiStatsDeviceMinTime.2 = STRING: 2.21395 milliseconds
CACTI-MIB::cactiStatsDeviceMinTime.3 = STRING: 0.44394 milliseconds
CACTI-MIB::cactiStatsDeviceMaxTime.1 = STRING: 0.47302 milliseconds
CACTI-MIB::cactiStatsDeviceMaxTime.2 = STRING: 400.03800 milliseconds
CACTI-MIB::cactiStatsDeviceMaxTime.3 = STRING: 16.32404 milliseconds
CACTI-MIB::cactiStatsDeviceCurTime.1 = STRING: 0.06390 milliseconds
CACTI-MIB::cactiStatsDeviceCurTime.2 = STRING: 3.35693 milliseconds
CACTI-MIB::cactiStatsDeviceCurTime.3 = STRING: 0.73409 milliseconds
CACTI-MIB::cactiStatsDeviceAvgTime.1 = STRING: 0.06410 milliseconds
CACTI-MIB::cactiStatsDeviceAvgTime.2 = STRING: 3.78410 milliseconds
CACTI-MIB::cactiStatsDeviceAvgTime.3 = STRING: 0.98009 milliseconds
CACTI-MIB::cactiStatsDeviceTotalPolls.1 = Gauge32: 7502
CACTI-MIB::cactiStatsDeviceTotalPolls.2 = Gauge32: 7474
CACTI-MIB::cactiStatsDeviceTotalPolls.3 = Gauge32: 7205
CACTI-MIB::cactiStatsDeviceFailedPolls.1 = Gauge32: 0
CACTI-MIB::cactiStatsDeviceFailedPolls.2 = Gauge32: 2
CACTI-MIB::cactiStatsDeviceFailedPolls.3 = Gauge32: 0
CACTI-MIB::cactiStatsDeviceAvailability.1 = STRING: 100.00000 percent
CACTI-MIB::cactiStatsDeviceAvailability.2 = STRING: 99.97320 percent
CACTI-MIB::cactiStatsDeviceAvailability.3 = STRING: 100.00000 percent
CACTI-MIB::cactiStatsPollerIndex.1 = Gauge32: 1
CACTI-MIB::cactiStatsPollerHostname.1 = STRING: localhost
CACTI-MIB::cactiStatsPollerRunTime.1 = STRING: 0.1109 seconds
CACTI-MIB::cactiStatsPollerMethod.1 = INTEGER: spine(2)
CACTI-MIB::cactiStatsPollerConcurrentProcesses.1 = Gauge32: 1
CACTI-MIB::cactiStatsPollerThreads.1 = Gauge32: 8
CACTI-MIB::cactiStatsPollerHosts.1 = Gauge32: 4
CACTI-MIB::cactiStatsPollerHostsPerProcess.1 = Gauge32: 4
CACTI-MIB::cactiStatsPollerItems.1 = Gauge32: 16
CACTI-MIB::cactiStatsPollerRrrdsProcessed.1 = Gauge32: 13
CACTI-MIB::cactiStatsPollerUtilization.1 = STRING: 0.1848333333 percent
CACTI-MIB::cactiStatsTotalsDeviceStatusUnknown.0 = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusDown.0 = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusRecovering.0 = Gauge32: 0
CACTI-MIB::cactiStatsTotalsDeviceStatusUp.0 = Gauge32: 3
CACTI-MIB::cactiStatsTotalsDeviceStatusDisabled.0 = Gauge32: 0
CACTI-MIB::cactiEventDescription.0 = STRING:
CACTI-MIB::cactiPlugins.4.1.1.0 = Gauge32: 0
CACTI-MIB::cactiPlugins.4.2.1.0 = Gauge32: 0
CACTI-MIB::cactiPlugins.4.3.1.1.0 = ""
Timeout: No Response from localhost
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: Cacti SNMPAgent - v0.2.3 (released 28/Oct/15)

Post by browniebraun »

I believe this happened if a print statement has been executed instead of fwrite, but I'm not absolutely sure. It's a long time ago that a was working on that code that last time. Line 131 of persist.php should definitely been changed from:

Code: Select all

fwrite(STDOUT, print "NONE" . $eol);
to

Code: Select all

fwrite(STDOUT, "NONE" . $eol);
But I'm not sure if this fixes your issue. On my development server I can executed multiple SNMPwalks without having timeouts. :o
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests