[solved] Cacti on Windows [ARG!!]

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

[solved] Cacti on Windows [ARG!!]

Post by Pollux »

Ok, I give up. After spending a few days on these forums, and trying to get my Cacti installation to work, I decided to just give up and ask for help.

I have:

-Read and followed BSOD's guide 3 times. (http://bsod2600.home.comcast.net/install_windows.html)
-Read BSOD's FAQ (http://bsod2600.home.comcast.net/~bsod2 ... ndows.html)
-Latest version of Cacti (0.8.7d), so no patches available

Operating System: Windows Server 2003 Std. SP2
Webserver: IIS 6.0
Cacti: 0.8.7d
Spine: 0.8.7a (I think)
MySQL: MySQL 5.0.83 (no install version)
PHP: PHP 5.2.9-2
RRDTool (Cygwin or Win32 version): Win32 Version
Net-SNMP: net-snmp-5.4.2.1-1
Cygwin (cygwin1.dll version): N/A
Plugin Architecture: N/A



I ran into different problems each time. This current installation is kinda buggy for me:


When I click on Technical Support under utilities, it just times out.

The server running Cacti has Windows' SNMP installed (Add/Remove components, Apps, SNMP), however, I don't see 'SNMP' under Computer Management>Services and Applications>

Everytime I run `php -m` I get:

Code: Select all

Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
^ Yes, MIBDIRS is set as environmental variable, and it's set to C:\php\extras\mibs where the .txt mib files are with the .index file and I rebooted. I also copied the mibs folder to user/mibs just in case

I can add a device (cisco router), it creates .rrd files and I can see its hostname, IP, interfaces & vlan config, but it doesn't display the graph (timesout; not even blank graph) [In my previous attempt, I managed to get blank graphs]

All paths are Okay

When I use Spine to poll instead of cmd.php, I get 'Waiting for poller 2/2' over and over again.

I'm this close to just give Windows up and set this up on CentOS..


I ran the mysql .msi file to install but it didnt let me (who knows why..) so I just went with the 'plug n play' mysql version. It's the only thing I did different from the guide, but it works fine as long as I start it everytime with `mysqld`.


I probably forgot a few things that I was supposed to post but I'm exhausted... so hope you forgive me :)

I really need to get this to work!, can't really think of anything else..

Cheers, hope any of you can enlighten me!
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

After rebooting the server:

Output of `php poller.php`

Code: Select all

06/16/2009 05:19:20 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Scheduled Task Int: '300', Time Since Last: '278', Max Runtime '298', Poller Runs: '1'
06/16/2009 05:19:20 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 0 0]
06/16/2009 05:19:20 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 4 4]
Waiting on 1/2 pollers.
06/16/2009 05:19:22 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\Inetpub\wwwroot\cacti\rra\router_5min_cpu_29.rrd --template 5min_cpu 1245
197961:0
06/16/2009 05:19:22 PM - SYSTEM STATS: Time:1.2566 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
Loop  Time is: 1.2631149291992
Sleep Time is: 298.72506713867
Total Time is: 1.2749328613281
Output of `php cmd.php`

Code: Select all

06/16/2009 05:21:06 PM - CMDPHP: Poller[0] Host[4] PING: UDP Ping Success (0.71ms)
06/16/2009 05:21:06 PM - CMDPHP: Poller[0] Host[4] SNMP: Host responded to SNMP
06/16/2009 05:21:06 PM - CMDPHP: Poller[0] Host[4] RECACHE: Processing 1 items in the auto reindex cache for '10.3.1.1'.
06/16/2009 05:21:06 PM - CMDPHP: Poller[0] Host[4] DS[29] SNMP: v1: 10.3.1.1, dsname: 5min_cpu, oid: .1.3.6.1.4.1.9.2.1.58.0, output: 0
06/16/2009 05:21:06 PM - CMDPHP: Poller[0] Time: 0.0451 s, Theads: N/A, Hosts: 1

Also, Technical Support works now..

Here's the lengthy output:

Code: Select all

Technical Support 
 
General Information 
Date Tue, 16 Jun 2009 17:28:09 -0700 
Cacti Version 0.8.7d 
Cacti OS win32 
SNMP Version NET-SNMP version: 5.4.2.1  
RRDTool Version RRDTool 1.2.x  
Hosts 1 
Graphs 3 
Data Sources SNMP: 1
SNMP Query: 2
Total: 3 
Poller Information 
Interval 300 
Type cmd.php 
Items Action[0]: 5
Total: 5 
Concurrent Processes 1 
Max Threads 1 
PHP Servers 1 
Script Timeout 25 
Max OID 10 
Last Run Statistics Time:1.2566 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1 
PHP Information 
PHP Version 5.2.9-2 
PHP OS WINNT 
PHP uname Windows NT SENTINEL101 5.2 build 3790 
PHP SNMP Installed 
max_execution_time 60 
memory_limit 128M 
MySQL Table Information 
Name Rows Engine Collation Check Status 
cdef 6 MyISAM latin1_swedish_ci OK 
cdef_items 16 MyISAM latin1_swedish_ci OK 
colors 101 MyISAM latin1_swedish_ci OK 
data_input 12 MyISAM latin1_swedish_ci OK 
data_input_data 342 MyISAM latin1_swedish_ci OK 
data_input_fields 46 MyISAM latin1_swedish_ci OK 
data_local 3 MyISAM latin1_swedish_ci OK 
data_template 41 MyISAM latin1_swedish_ci OK 
data_template_data 44 MyISAM latin1_swedish_ci OK 
data_template_data_rra 240 MyISAM latin1_swedish_ci OK 
data_template_rrd 60 MyISAM latin1_swedish_ci OK 
graph_local 3 MyISAM latin1_swedish_ci OK 
graph_template_input 77 MyISAM latin1_swedish_ci OK 
graph_template_input_defs 257 MyISAM latin1_swedish_ci OK 
graph_templates 33 MyISAM latin1_swedish_ci OK 
graph_templates_gprint 3 MyISAM latin1_swedish_ci OK 
graph_templates_graph 36 MyISAM latin1_swedish_ci OK 
graph_templates_item 281 MyISAM latin1_swedish_ci OK 
graph_tree 1 MyISAM latin1_swedish_ci OK 
graph_tree_items 3 MyISAM latin1_swedish_ci OK 
host 1 MyISAM latin1_swedish_ci OK 
host_graph 1 MyISAM latin1_swedish_ci OK 
host_snmp_cache 97 MyISAM latin1_swedish_ci OK 
host_snmp_query 1 MyISAM latin1_swedish_ci OK 
host_template 7 MyISAM latin1_swedish_ci OK 
host_template_graph 14 MyISAM latin1_swedish_ci OK 
host_template_snmp_query 13 MyISAM latin1_swedish_ci OK 
poller 0 MyISAM latin1_swedish_ci OK 
poller_command 0 MyISAM latin1_swedish_ci OK 
poller_item 5 MyISAM latin1_swedish_ci OK 
poller_output 5 MyISAM latin1_swedish_ci OK 
poller_reindex 1 MyISAM latin1_swedish_ci OK 
poller_time 1 MyISAM latin1_swedish_ci OK 
rra 5 MyISAM latin1_swedish_ci OK 
rra_cf 10 MyISAM latin1_swedish_ci OK 
settings 54 MyISAM latin1_swedish_ci OK 
settings_graphs 0 MyISAM latin1_swedish_ci OK 
settings_tree 0 MyISAM latin1_swedish_ci OK 
snmp_query 8 MyISAM latin1_swedish_ci OK 
snmp_query_graph 19 MyISAM latin1_swedish_ci OK 
snmp_query_graph_rrd 39 MyISAM latin1_swedish_ci OK 
snmp_query_graph_rrd_sv 59 MyISAM latin1_swedish_ci OK 
snmp_query_graph_sv 40 MyISAM latin1_swedish_ci OK 
user_auth 2 MyISAM latin1_swedish_ci OK 
user_auth_perms 0 MyISAM latin1_swedish_ci OK 
user_auth_realm 17 MyISAM latin1_swedish_ci OK 
user_log 10 MyISAM latin1_swedish_ci OK 
version 1 MyISAM latin1_swedish_ci OK 
 


Problem persists, Blank graph for the default 5 min CPU graph and any others that I create give me the red x image (even after running `php poller.php` and `php cmd.php`)

I also keep getting:

Code: Select all

Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
on `php -m`, `php cmd.php` and `php poller.php`
elixer1
Posts: 1
Joined: Wed Jun 17, 2009 10:29 am

Same Deal.

Post by elixer1 »

I'm using the same components on the same system (although it's a vm), and I'm also having issues. Not so much of the technical nature (I've just started so I haven't identified the exact problems), but it has not been clean so far.

Some nice detailed instructions from the Cacti experts, sure would be appreciated.
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

UPDATE:

I'm getting graphs for my Cacti server and other servers too.

However, I can only get data from processes. CPU Utilization and any other graph template fails..

any ideas?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Which templates are specifically failing? Does the verbose query work?

Have you followed the debugging guide (in the documentation site / linked in the readme forum sticky) on why it's failing?

I wouldn't switch to spine until cacti is functional -- also you need to set it up in spine.conf.

Any reason you didn't want to use my installer initially?
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

First, thanks for reading!

Which templates are specifically failing? Does the verbose query work?

Only the default MIB graph template seem to work; I'm trying to get the traffic information (It's a VMWare server polling other VMWare machines). A debug graph mode returns:

ERROR: opening 'C:/Inetpub/wwwroot/cacti/rra/sentinel1_traffic_in_53.rrd': No such file or directory

But rrdtool works fine and can create graphs for other templates.


Have you followed the debugging guide (in the documentation site / linked in the readme forum sticky) on why it's failing?

(See above). Also, when I do `php cmd.php`, I get this:

Code: Select all

[i]*output omitted*[/i]
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[53] SNMP: v1: localhost, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.65539, output: 4048935
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[47] WARNING: Result from SNMP not valid.  Partial Result: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[47] SNMP: v1: localhost, dsname: mem_free, oid: .1.3.6.1.4.1.2021.4.6.0, output: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[48] WARNING: Result from SNMP not valid.  Partial Result: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[48] SNMP: v1: localhost, dsname: mem_buffers, oid: .1.3.6.1.4.1.2021.4.14.0, output: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[49] WARNING: Result from SNMP not valid.  Partial Result: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[49] SNMP: v1: localhost, dsname: mem_cache, oid: .1.3.6.1.4.1.2021.4.15.0, output: U
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[50] SNMP: v1: localhost, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.65539, output: 0
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[50] SNMP: v1: localhost, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.65539, output: 0
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[50] SNMP: v1: localhost, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.65539, output: 0
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[50] SNMP: v1: localhost, dsname: errors_out, oid: .1.3.6.1.2.1.2.2.1.20.65539, output: 0
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[53] SNMP: v1: localhost, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.65539, output: 26934266
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[52] SNMP: v1: localhost, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.65539, output: 26934266
06/17/2009 01:51:48 PM - CMDPHP: Poller[0] Host[2] DS[52] SNMP: v1: localhost, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.65539, output: 4048935
[i]*output omitted*[/i]
(Some queries are valid, some aren't)

I wouldn't switch to spine until cacti is functional -- also you need to set it up in spine.conf.

I agree, thought I'd just give it a shot :P (spine.conf was configured)

Any reason you didn't want to use my installer initially?

I got a weird MSI error. It said the installation was cancelled (typical error when you have to restart to install a program, or another msi already running). I rebooted several times, but the installation never worked.


As of now, some graphs work fine (Logged in users, Processes, Used space C), some other graphs are blank (Memory usage, traffic errors on VMWare interface) and other graphs cannot be created (red x. traffic in/out bytes and traffic bandwidth usage).
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

Ok.

I'm getting better at this, solving a few problems while I still learn how to use Cacti.

However, I'm stuck again :(


My only issue at the moment is this:


When I add new devices, and go to New Graph, the SNMP Interface Statistics returns 0 rows..

Here's the query in debug mode:



Code: Select all

+ Running data query [1].
+ Found type = '4 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing script for list of indexes ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Executing script query ' '
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/interface.xml'
What am I doing wrong :(
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Make sure the following is set in php.ini:
register_argc_argv = On
safe_mode = Off

Also enable php error logging in php.ini to aid with troubleshooting.

The cacti technical support page show any errors? I assume the interface verbose query is blank for all devices?
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

Hi!

Yes, php.ini is set with those proper values.

Technical Support on cacti doesn't show any errors, and no errors are being logged at all (even with error_reporting = E_ALL).

Yes, all devices report empty verbose queries result.

Made sure 'C:/Inetpub/wwwroot/cacti/resource/snmp_queries/interface.xml' exists and is accessible by IUSR_XX, IWAM_XX and IIS_WPG.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Odd. Well since you're just starting out with a fresh install, I'd suggest you clear out the cacti files and its DB. Then start fresh once again with those two steps. Maybe during your previous troubleshooting you borked something.
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

Done. This time I can see the Interfaces.

This is what I did as soon as I restored the database:

-Create device (localhost)
-Create new Graph (SNMP - Interface)
-Graph Management (Add SNMP Interface graphs to Graph Tree

I then ran php cmd.php and this is part of the output:

06/18/2009 06:22:24 PM - CMDPHP: Poller[0] Host[1] DS[119] SNMP: v2: localhost, dsname: traffic_out, oid: .1.3.6.1.2.1.31.1.1.1.10.65539, output: U

06/18/2009 06:22:24 PM - CMDPHP: Poller[0] Host[1] DS[119]WARNING: Result from SNMP not valid. Partial Result: No Such Object avail

06/18/2009 06:22:24 PM - CMDPHP: Poller[0] Host[1] DS[119] SNMP: v2: localhost, dsname: traffic_in, oid: .1.3.6.1.2.1.31.1.1.1.6.65539, output: U

How come 1 is valid and the other one isn't? snmpwalk, snmpget and the others run without issue.


anyways, I ran php poller.php after that.


Some graphs were created (blank), some where not created (red X), and graphs for Memory & Unicast & Non-Unicasts were created and graphed as well.
(See attached image of thumbnail view)



Host is running net-snmp, no errors in snmp or php's logs.
SNMP interface verbose query looks fine
Attachments
thumbnail.PNG
thumbnail.PNG (34.46 KiB) Viewed 3966 times
Pollux
Posts: 25
Joined: Tue Jun 16, 2009 3:34 pm

Post by Pollux »

lol.......


I've spent at least 3 or 4 FULL days at work trying to get this to work in Windows.

Well, I came home tonight at like 10pm, and with a fresh installation of linux (CentOS 5.2) I got this working on a VM at home within the hour polling my guest OS Windows XP and my home cisco router. It works for everything; network interfaces, memory, cpu, etc.

Linux 1 : Windows 0


Now I gotta force Linux on the HP Servers at work.

Thanks a lot BSOD, you gave me hope!

/closed
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Ah well.

Don't let TheWitness see this thread.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests