SNMP over non-standard port [Disk Space and Win Services]

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
User avatar
rdleeuw
Posts: 8
Joined: Thu Jan 25, 2007 2:26 pm
Location: Netherlands

SNMP over non-standard port [Disk Space and Win Services]

Post by rdleeuw »

Hello,

I try to create graphs for a Windows 2000/XP host where SNMP is reachable on UDP port 10161. CPU, Users, Processes and Traffic is no problem. However beneath 'Data Query [SNMP - Get Mounted Partitions]' it says :

Code: Select all

'This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.' 
Running debug mode says the following (real IP and Community changed):

Code: Select all

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 public 2 7 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 public 2 7 query index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 public 2 7 query description'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 public 2 7 query sau'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 public 2 7 query total'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
I see no reference in this debug to my non-standard SNMP-port 10161, how can I correct this ?

Thanks, Ronald

BTW [Win Services] also seems to have the same problem, no reference in the debug to port 10161 :

Code: Select all

+ Running data query [10].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/win_services.php 1.1.1.1 public 2 6 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/win_services.php 1.1.1.1 public 2 6 query index'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
[quote][b]Cacti Version[/b] - 0.8.6j
[b]Plugin Architecture[/b] - 1.1
[b]Poller Type[/b] - Cactid v0.8.6i
[b]Server Info[/b] - Linux 2.6.9-42.0.8.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (CentOS)
[b]PHP[/b] - 4.3.9
[b]PHP Extensions[/b] - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
[b]MySQL[/b] - 4.1.20
[b]RRDTool[/b] - 1.2.15
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]PHP Network Weathermap (weathermap - v0.82)
Thresholds (thold - v0.3.0)
Device Monitoring (monitor - v0.7)
Network Discovery (discovery - v0.6)
Network Tools (tools - v0.2)
Syslog Monitoring (haloe - v0.4)
mactrack
RRD Cleaner (rrdclean - v1.1)
Update Checker (update - v0.3)
FlowView (flowview - v0.3)
Host Info (hostinfo - v0.1)
Error Images (errorimage - v0.1)[/list][/quote]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'm quite sure, that this query includes port 161 as a fixed string. You may use my templates at http://forums.cacti.net/viewtopic.php?t=11647 instead or change the script's code
Reinhard
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

You appear to be using CACTID. According to the information shipped with this utility, you cannot change the SNMP port to another.

Hope this helps ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

with Cacti 0.8.6i, you can use non standard SNMP ports :

Code: Select all

bug#0000691: Cactid fails with custom snmp port
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
rdleeuw
Posts: 8
Joined: Thu Jan 25, 2007 2:26 pm
Location: Netherlands

Post by rdleeuw »

Indeed it seems I have hit a bug, does anybody know if it is resolved in 0.8.6j ?

Edit:

I just succeeded in upgrading to cacti 0.8.6j, my problem is solved now for the Disk statistics.

Code: Select all

+ Running data query [8].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 6 2:10161:1000:public:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 6 2:10161:1000:public:::MD5::[None] query index'
+ Found item [hrStorageIndex='1'] index: 1
+ Found item [hrStorageIndex='2'] index: 2
+ Found item [hrStorageIndex='3'] index: 3
+ Found item [hrStorageIndex='4'] index: 4
+ Found item [hrStorageIndex='5'] index: 5
+ Found item [hrStorageIndex='6'] index: 6
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 6 2:10161:1000:public:::MD5::[None] query description'
+ Found item [hrStorageDescr='A:'] index: 1
+ Found item [hrStorageDescr='C: Label:SYSTEEM Serial Number bc10fc59'] index: 2
+ Found item [hrStorageDescr='D: Label:DATA Serial Number 8ae80dbe'] index: 3
+ Found item [hrStorageDescr='E:'] index: 4
+ Found item [hrStorageDescr='Virtual Memory'] index: 5
+ Found item [hrStorageDescr='Physical Memory'] index: 6
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/ss_host_disk.php 1.1.1.1 6 2:10161:1000:public:::MD5::[None] query sau'
+ Found item [hrStorageAllocationUnits='0 Bytes'] index: 1
+ Found item [hrStorageAllocationUnits='4096 Bytes'] index: 2
+ Found item [hrStorageAllocationUnits='16384 Bytes'] index: 3
+ Found item [hrStorageAllocationUnits='0 Bytes'] index: 4
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 5
+ Found item [hrStorageAllocationUnits='65536 Bytes'] index: 6
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/host_disk.xml'
Indeed I now see references to my non-standard SNMP-port 10161.

However I still have the problem with Win Services, it seems those scripts were not updated in 0.8.6j.


Ronald
User avatar
rdleeuw
Posts: 8
Joined: Thu Jan 25, 2007 2:26 pm
Location: Netherlands

Post by rdleeuw »

Update

It seems SNMP port 161 is hard-coded in the win_services.php script on line 16 :

Code: Select all

function win_services($hostname, $snmp_community, $snmp_version, $host_id, $cmd, $arg1 = "", $arg2 = "", $snmp_port = 161, $snmp_timeout = 500) {
I have absolutely no problems with modifying someone else's code without having a clue what i'm doing :o so I modified line 16 to :

Code: Select all

function win_services($hostname, $snmp_community, $snmp_version, $host_id, $snmp_port, $cmd, $arg1 = "", $arg2 = "", $snmp_timeout = 500) {
I also modified win_services.xml line 7 to :

Code: Select all

<arg_prepend>|host_hostname| |host_snmp_community| |host_snmp_version| |host_id| |host_snmp_port|</arg_prepend>
At least it seems these modifications didn't break things. Win_services on host with SNMP port 161 still work. But hosts with non-standard SNMP port 10161 are still not working. Can anyone assist in getting this to work?

Ronald
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - Cactid v0.8.6i
Server Info - Linux 2.6.9-42.0.8.ELsmp
Web Server - Apache/2.0.52 (CentOS)
PHP - 4.3.9
PHP Extensions - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
MySQL - 4.1.20
RRDTool - 1.2.15
SNMP - 5.1.2
Plugins
  • PHP Network Weathermap (weathermap - v0.82)
    Thresholds (thold - v0.3.0)
    Device Monitoring (monitor - v0.7)
    Network Discovery (discovery - v0.6)
    Network Tools (tools - v0.2)
    Syslog Monitoring (haloe - v0.4)
    mactrack
    RRD Cleaner (rrdclean - v1.1)
    Update Checker (update - v0.3)
    FlowView (flowview - v0.3)
    Host Info (hostinfo - v0.1)
    Error Images (errorimage - v0.1)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please remember my first post. I tried to tell you exactly this. Again, I'd like to advertise my pure SNMP method which is faster and should work with latest cactid (at least, it works for me)
Reinhard
User avatar
rdleeuw
Posts: 8
Joined: Thu Jan 25, 2007 2:26 pm
Location: Netherlands

Post by rdleeuw »

Ok, ok Gandalf, I'll take the hard way to Mordor 8)

I first downloaded the LanMgr-Mib-II-MIB ( LMMIB2-MIB.txt ) and placed it in /usr/share/snmp/mibs/ .

I've created the following XML :

Code: Select all

<interface> 
        <name>Get svSvcTable Information</name> 
        <description>Get SNMP based Windows Services out of svSvcTable</description> 
        <index_order_type>numeric</index_order_type> 
        <oid_index>.1.3.6.1.4.1.77.1.2.3.1.1</oid_index> 
        <fields> 
                <svSvcName> 
                        <name>Name</name> 
                        <method>walk</method> 
                        <source>value</source> 
                        <direction>input</direction> 
                        <oid>.1.3.6.1.4.1.77.1.2.3.1.1</oid> 
                </svSvcName> 
                <svSvcOperatingState> 
                        <name>Operating State</name> 
                        <method>walk</method> 
                        <source>value</source> 
                        <direction>input</direction> 
                        <oid>.1.3.6.1.4.1.77.1.2.3.1.3</oid> 
                </svSvcOperatingState> 
        </fields> 
</interface>
However when I do a Verbose Query I get the following :

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/svSvcTable.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.77.1.2.3.1.1'
+ Located input field 'svSvcName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.77.1.2.3.1.1'
+ Found item [svSvcName='Server'] index: 114 [from value]
+ Found item [svSvcName='HTTP SSL'] index: 76 [from value]
+ Found item [svSvcName='Event Log'] index: 103 [from value]
+ Found item [svSvcName='Net Logon'] index: 110 [from value]
+ Found item [svSvcName='Telephony'] index: 121 [from value]
+ Found item [svSvcName='DNS Client'] index: 116 [from value]
+ Found item [svSvcName='DNS Server'] index: 114 [from value]
+ Found item [svSvcName='DHCP Client'] index: 116 [from value]
+ Found item [svSvcName='DHCP Server'] index: 114 [from value]
+ Found item [svSvcName='PDScheduler'] index: 114 [from value]
+ Found item [svSvcName='Workstation'] index: 110 [from value]
+ Found item [svSvcName='SNMP Service'] index: 101 [from value]
+ Found item [svSvcName='Windows Time'] index: 101 [from value]
+ Found item [svSvcName='Plug and Play'] index: 121 [from value]
+ Found item [svSvcName='Print Spooler'] index: 114 [from value]
+ Found item [svSvcName='Windows Audio'] index: 111 [from value]
+ Found item [svSvcName='IPSEC Services'] index: 115 [from value]
+ Found item [svSvcName='Task Scheduler'] index: 114 [from value]
+ Found item [svSvcName='Event Log Watch'] index: 104 [from value]
+ Found item [svSvcName='Remote Registry'] index: 121 [from value]
+ Found item [svSvcName='Secondary Logon'] index: 110 [from value]
+ Found item [svSvcName='Computer Browser'] index: 114 [from value]
+ Found item [svSvcName='Help and Support'] index: 116 [from value]
+ Found item [svSvcName='Automatic Updates'] index: 115 [from value]
+ Found item [svSvcName='COM+ Event System'] index: 109 [from value]
+ Found item [svSvcName='IIS Admin Service'] index: 101 [from value]
+ Found item [svSvcName='Protected Storage'] index: 101 [from value]
+ Found item [svSvcName='Terminal Services'] index: 115 [from value]
+ Found item [svSvcName='Intersite Messaging'] index: 103 [from value]
+ Found item [svSvcName='Network Connections'] index: 115 [from value]
+ Found item [svSvcName='Acronis Group Server'] index: 114 [from value]
+ Found item [svSvcName='Acronis Remote Agent'] index: 116 [from value]
+ Found item [svSvcName='Acronis VSS Provider'] index: 114 [from value]
+ Found item [svSvcName='Certificate Services'] index: 115 [from value]
+ Found item [svSvcName='Logical Disk Manager'] index: 114 [from value]
+ Found item [svSvcName='TCP/IP NetBIOS Helper'] index: 114 [from value]
+ Found item [svSvcName='Cryptographic Services'] index: 115 [from value]
+ Found item [svSvcName='Wireless Configuration'] index: 110 [from value]
+ Found item [svSvcName='COM+ System Application'] index: 110 [from value]
+ Found item [svSvcName='Distributed File System'] index: 109 [from value]
+ Found item [svSvcName='Error Reporting Service'] index: 101 [from value]
+ Found item [svSvcName='File Replication Service'] index: 101 [from value]
+ Found item [svSvcName='McAfee Framework Service'] index: 101 [from value]
+ Found item [svSvcName='Shell Hardware Detection'] index: 110 [from value]
+ Found item [svSvcName='Security Accounts Manager'] index: 114 [from value]
+ Found item [svSvcName='System Event Notification'] index: 110 [from value]
+ Found item [svSvcName='Terminal Server Licensing'] index: 103 [from value]
+ Found item [svSvcName='User Profile Hive Cleanup'] index: 112 [from value]
+ Found item [svSvcName='Acronis Scheduler2 Service'] index: 101 [from value]
+ Found item [svSvcName='Network Associates McShield'] index: 100 [from value]
+ Found item [svSvcName='Remote Procedure Call (RPC)'] index: 41 [from value]
+ Found item [svSvcName='DCOM Server Process Launcher'] index: 114 [from value]
+ Found item [svSvcName='Acronis Backup Server Service'] index: 101 [from value]
+ Found item [svSvcName='CA BrightStor Universal Agent'] index: 116 [from value]
+ Found item [svSvcName='HP System Management Homepage'] index: 101 [from value]
+ Found item [svSvcName='Microsoft Exchange Management'] index: 116 [from value]
+ Found item [svSvcName='CA Backup Agent for Open Files'] index: 115 [from value]
+ Found item [svSvcName='CA BrightStor Discovery Service'] index: 101 [from value]
+ Found item [svSvcName='Internet Authentication Service'] index: 101 [from value]
+ Found item [svSvcName='NT LM Security Support Provider'] index: 114 [from value]
+ Found item [svSvcName='Network Associates Task Manager'] index: 114 [from value]
+ Found item [svSvcName='Kerberos Key Distribution Center'] index: 114 [from value]
+ Found item [svSvcName='Network Location Awareness (NLA)'] index: 41 [from value]
+ Found item [svSvcName='Remote Access Connection Manager'] index: 114 [from value]
+ Found item [svSvcName='Application Layer Gateway Service'] index: 101 [from value]
+ Found item [svSvcName='World Wide Web Publishing Service'] index: 101 [from value]
+ Found item [svSvcName='HP ProLiant Remote Monitor Service'] index: 101 [from value]
+ Found item [svSvcName='Windows Management Instrumentation'] index: 110 [from value]
+ Found item [svSvcName='Distributed Transaction Coordinator'] index: 114 [from value]
+ Found item [svSvcName='HP ProLiant System Shutdown Service'] index: 101 [from value]
+ Found item [svSvcName='Windows Internet Name Service (WINS)'] index: 41 [from value]
+ Found item [svSvcName='Application Experience Lookup Service'] index: 101 [from value]
+ Found item [svSvcName='Windows Firewall/Internet Connection Sharing (ICS)'] index: 41 [from value]
+ Located input field 'svSvcOperatingState' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.77.1.2.3.1.3'
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 76 [from value]
+ Found item [svSvcOperatingState='1'] index: 103 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 121 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 121 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 111 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 104 [from value]
+ Found item [svSvcOperatingState='1'] index: 121 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 109 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 103 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 109 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 103 [from value]
+ Found item [svSvcOperatingState='1'] index: 112 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 100 [from value]
+ Found item [svSvcOperatingState='1'] index: 41 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 116 [from value]
+ Found item [svSvcOperatingState='1'] index: 115 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 41 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 110 [from value]
+ Found item [svSvcOperatingState='1'] index: 114 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 41 [from value]
+ Found item [svSvcOperatingState='1'] index: 101 [from value]
+ Found item [svSvcOperatingState='1'] index: 41 [from value]
+ Found data query XML file at '/var/www/html/resource/snmp_queries/svSvcTable.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/svSvcTable.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/svSvcTable.xml'
At least I see all services, but I also see duplicate index numbers ? (f.e. 41 ? )

When I click Create Graphs for this host I only see 14 services (text dump of page below) ?

Data Query [SNMP - svSvcTable]

Name Operating State
Windows Firewall/Internet Connection Sharing (ICS) 1
HTTP SSL 1
Network Associates McShield 1
Application Experience Lookup Service 1
Terminal Server Licensing 1
Event Log Watch 1
Distributed File System 1
Windows Management Instrumentation 1
Windows Audio 1
User Profile Hive Cleanup 1
Distributed Transaction Coordinator 1
CA Backup Agent for Open Files 1
Microsoft Exchange Management 1
Remote Registry 1

It seems something is wrong in my XML, but I don't see it.

Ronald
[quote][b]Cacti Version[/b] - 0.8.6j
[b]Plugin Architecture[/b] - 1.1
[b]Poller Type[/b] - Cactid v0.8.6i
[b]Server Info[/b] - Linux 2.6.9-42.0.8.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (CentOS)
[b]PHP[/b] - 4.3.9
[b]PHP Extensions[/b] - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
[b]MySQL[/b] - 4.1.20
[b]RRDTool[/b] - 1.2.15
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]PHP Network Weathermap (weathermap - v0.82)
Thresholds (thold - v0.3.0)
Device Monitoring (monitor - v0.7)
Network Discovery (discovery - v0.6)
Network Tools (tools - v0.2)
Syslog Monitoring (haloe - v0.4)
mactrack
RRD Cleaner (rrdclean - v1.1)
Update Checker (update - v0.3)
FlowView (flowview - v0.3)
Host Info (hostinfo - v0.1)
Error Images (errorimage - v0.1)[/list][/quote]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Ahh, sorry, missed the reference to the win services.
Can you please perform an snmpwalk for those OIDs? Are there any duplicates as well? If yes: SNMP agent is buggy; if no: your script is buggy
Reinhard
User avatar
rdleeuw
Posts: 8
Joined: Thu Jan 25, 2007 2:26 pm
Location: Netherlands

Post by rdleeuw »

Gandalf,

Attached are the SNMP queries. It seems to me my script is not quite correct, but I don't see what I'm doing wrong.

Ronald
Attachments
snmpqueries.txt
SNMP queries
(57.52 KiB) Downloaded 223 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Ok, fine. But what are you going to retrieve? Please remember, that cacti is used to graph some numbers stored in rrd files? What numbers do you want to store? Services up/down status? Please elaborate
Reinhard
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This is NASTY NASTY. You need to use OID Index parse on this. The service name is the primary key. What you are seeing is a series of HEX values that when converted to ASCII spell the name of the service. The only way to fix this is with OID INDEX PARSE.

There are several examples around the forum on how to use 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?
flippper
Posts: 1
Joined: Wed Mar 07, 2007 3:22 am

adjusted files for services over non standaard port

Post by flippper »

i made some changes in the files and it seems to be working now ...

still testing.

the services are now visible over non standaard ports, but the services will not show up running.
all services are 0 .

anybody got any ideas how to fix this ?
Attachments
services.rar
(1.53 KiB) Downloaded 133 times
jos_l
Posts: 2
Joined: Thu Sep 23, 2010 9:49 am

Post by jos_l »

Let's kick up this one.. :wink:

I recently installed Cacti 0.8.7c (recent CactiEZ), all is working fine except for the (windows) services on non-161 ports:

Code: Select all

+ Running data query [10].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/html/scripts/win_services.php x.x.x.x public 1 10 index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/win_services.php x.x.x.x public 1 10 query index'
+ Executing script query '/usr/bin/php -q /var/www/html/scripts/win_services.php x.x.x.x public 1 10 query status'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
+ Found data query XML file at '/var/www/html/resource/script_server/win_services.xml'
And:

Code: Select all

This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
On the default 161 port it's all working fine, internal LAN, external hosts, thresholds work nicely etc etc.


I can't imagine there isn't an easy fix after 2 years, I searched till I dropped.. :)

Am I missing something?

TIA!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests