Monitoring Windows partitions..
Moderators: Developers, Moderators
Monitoring Windows partitions..
I've seen the various bugs from 0.8.3a about how partitions won't monitor... I'm having the same problem with 0.8.4. (CPU works fine, though). I can query the partitions, and pick which drives I want to watch, but I get no graphs, and no .rrd file. From the poller cache:
Data Source: MSIESP-E2K02 - Used Space - D: Label:Data
RRD: /var/www/html/cacti/rra/msiespe2k02_hdd_used_354.rrd
Action: 1, Script: /usr/bin/php -q /var/www/html/cacti/scripts/query_host_partitions.php 10.145.1.177 public 1 get total 3
Running that script line manually returns a correct result, so that should be ok.. also, the max/min for the data template are already set to 0. Checked the include/functions.php (which I guess is now lib/functions.php?) and it looks like those changes are already in there too..
Help?
Data Source: MSIESP-E2K02 - Used Space - D: Label:Data
RRD: /var/www/html/cacti/rra/msiespe2k02_hdd_used_354.rrd
Action: 1, Script: /usr/bin/php -q /var/www/html/cacti/scripts/query_host_partitions.php 10.145.1.177 public 1 get total 3
Running that script line manually returns a correct result, so that should be ok.. also, the max/min for the data template are already set to 0. Checked the include/functions.php (which I guess is now lib/functions.php?) and it looks like those changes are already in there too..
Help?
Same here...
I want to monitor a few Windows servers as well. So far all I am able to monitor is Processes, Logged In Users and Network Traffic. I am unable to monitor CPUs or Drive Space. Like you, I get the correct response when I poll them manually. My UNIX and Linux servers are fine.
Another one
It seems I'm joining the club here. Any new ideas?
Some changes I made...
I noticed that in the code, from previous posts, that there are some typos in the code relating to snmp. Sometimes in the code, there is a transposition of snmp to smnp.
A grep of the code shows the lines:
I thought correcting the spelling and do a full install would solve the problem of missing CPU and Hard Drive graphs. Didn't work. I am still seeing the same errors in my rrd.log for CPU and HD Space.
I am digging through the code to find out why its not parsing the snmp response properly.
A grep of the code shows the lines:
Code: Select all
grep -r -H -n smnp *
cacti-0.8.4/cacti.sql:1995:INSERT INTO settings VALUES ('smnp_version','ucd-snmp');
cacti-0.8.4/include/config_settings.php:109: "smnp_version" => array(
cacti-0.8.4/install/index.php:146: $input["smnp_version"] = $settings["general"]["smnp_version"];
cacti-0.8.4/install/index.php:147: $input["smnp_version"]["default"] = "net-snmp";
cacti-0.8.4/lib/snmp.php:207: $snmp_auth = (read_config_option("smnp_version") == "ucd-snmp") ? "\"$community\"" : "-c \"$community\""; /* v1/v2 - community string */
cacti-0.8.4/lib/snmp.php:209: $snmp_auth = (read_config_option("smnp_version") == "ucd-snmp") ? "\"$community\"" : "-c \"$community\""; /* v1/v2 - community string */
cacti-0.8.4/lib/snmp.php:218: if (read_config_option("smnp_version") == "ucd-snmp") {
cacti-0.8.4/lib/snmp.php:220: }elseif (read_config_option("smnp_version") == "net-snmp") {
cacti-0.8.4/lib/snmp.php:250: $snmp_auth = (read_config_option("smnp_version") == "ucd-snmp") ? "\"$community\"" : "-c \"$community\""; /* v1/v2 - community string */
cacti-0.8.4/lib/snmp.php:252: $snmp_auth = (read_config_option("smnp_version") == "ucd-snmp") ? "\"$community\"" : "-c \"$community\""; /* v1/v2 - community string */
cacti-0.8.4/lib/snmp.php:258: if (read_config_option("smnp_version") == "ucd-snmp") {
cacti-0.8.4/lib/snmp.php:260: }elseif (read_config_option("smnp_version") == "net-snmp") {
Code: Select all
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_users_14.rrd --template users N:49
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_proc_15.rrd --template proc N:51
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_traffic_in_16.rrd --template traffic_out:traffic_in N:1167449352:1749288186
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_hdd_total_17.rrd --template hdd_used:hdd_total N:Content-type: text/html
8457871360:Content-type: text/html
18070937600
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_hdd_total_18.rrd --template hdd_used:hdd_total N:Content-type: text/html
342654976:Content-type: text/html
109083357184
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_cpu_19.rrd --template cpu N:Content-type: text/html
27
12/09/2003 11:10 PM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/biohazard_cpu_20.rrd --template cpu N:Content-type: text/html
13
BINGO!!!
I finally nailed the problem! I am a Perl hacker and have never played around with PHP so I would take my solution with a huge grain of salt. I mentioned in a previous post that I corrected the smnp<->snmp transposition. I don't know if this helped or did nothing with the following solution.
I keep noticing in the rrd.log that HTML headers were showing in the outputted data from query_host_cpu and query_host_partition. I went nuts going through scripts to figure out how to prevent the header from being shown. Finally, I figured out "$output" in cmd.php was outputting the HTML header along with an extra return. So I added these two lines right before each print $output; line.
I am now able to graph Windows CPU and Hard Drive size. I did not in all the code the line "$no_http_headers = true;". It doesn't seem to work as I get returns with HTML headers.
I keep noticing in the rrd.log that HTML headers were showing in the outputted data from query_host_cpu and query_host_partition. I went nuts going through scripts to figure out how to prevent the header from being shown. Finally, I figured out "$output" in cmd.php was outputting the HTML header along with an extra return. So I added these two lines right before each print $output; line.
Code: Select all
$output = str_replace("\n", "", $output);
$output = str_replace("Content-type: text/html", "", $output);
http headers aren't my problem..
I think I've found MY problem.. manually trying to run the rrdtool create line, gives me an error (a rather logical one too).
The data sources are both called hdd_used, rather than hdd_used and hdd_total, or something to that effect. Under data templates, I changed the first one to "hdd_total", and I'll see what happens.
The data sources are both called hdd_used, rather than hdd_used and hdd_total, or something to that effect. Under data templates, I changed the first one to "hdd_total", and I'll see what happens.
Who is online
Users browsing this forum: No registered users and 3 guests