0.8.3a fresh install problems

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

Moderators: Developers, Moderators

Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

0.8.3a fresh install problems

Post by Coeus »

Hey all,

After the upgrade problems I had, i've just reinstalled cacti from scratch.

I'm running on an upgrade 7.3 redhat box with net-snmp-5.0.6. All stats i'm collecting are via snmp.

Since then i have been unable to poll my windows servers for cpu info. I'm also unable to poll for partition/disk space usage via snmp.

One of my linux hosts is having problems also. Polling a Linux server (same server cacti runs on) via snmp results in only some partition info.
I get / and /var, but i'm missing two partitions under /export.

From snmpwalk for the linux box(trimmed for brevity) -
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskIndex.2 = INTEGER: 2
UCD-SNMP-MIB::dskIndex.3 = INTEGER: 3
UCD-SNMP-MIB::dskIndex.4 = INTEGER: 4
UCD-SNMP-MIB::dskPath.1 = STRING: /var
UCD-SNMP-MIB::dskPath.2 = STRING: /
UCD-SNMP-MIB::dskPath.3 = STRING: /export/home
UCD-SNMP-MIB::dskPath.4 = STRING: /export/software
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 2015920
UCD-SNMP-MIB::dskTotal.2 = INTEGER: 30874412
UCD-SNMP-MIB::dskTotal.3 = INTEGER: 105637856
UCD-SNMP-MIB::dskTotal.4 = INTEGER: 18215932
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 1503124
UCD-SNMP-MIB::dskAvail.2 = INTEGER: 26104700
UCD-SNMP-MIB::dskAvail.3 = INTEGER: 46842388
UCD-SNMP-MIB::dskAvail.4 = INTEGER: 2448588
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 410388
UCD-SNMP-MIB::dskUsed.2 = INTEGER: 3201364
UCD-SNMP-MIB::dskUsed.3 = INTEGER: 53429360
UCD-SNMP-MIB::dskUsed.4 = INTEGER: 14842000
Which looks correct. I'm still working on what the oids are for win2k server

Any and all ideas welcome.

Thanks

Carl
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Try this. Open up 'include/functions.php' in a text editor and go to line 548. You will see these two lines:

Code: Select all

$path = str_replace("|path_php_binary
	|", read_config_option("path_php_binary"), $path);
change these two lines, into:

Code: Select all

$path = str_replace("|path_php_binary|", read_config_option("path_php_binary"), $path);
-Ian
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Thats helped a bit :)

I can now poll the windows machines for partition and cpu info (both CPUs now thankyou!)

I can also poll the linux boxen for partition info, (still only one cpu reported..)

There is still no disk space information being returned for either windows or linux.

Willing to blindly test patches

Your efforts are sincerly appreciated.

Carl
User avatar
golemb
Posts: 30
Joined: Mon Jun 02, 2003 12:47 pm

Post by golemb »

I have been troubled by the same problem were the CPU and disk information in the polling host are empty when querying my W2K and W2K3 boxes. At first I thought I had done something wrong when upgrading from version 8.2a. I will try changing the code before I go back to version 8.2a.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

golemb wrote:I have been troubled by the same problem were the CPU and disk information in the polling host are empty when querying my W2K and W2K3 boxes. At first I thought I had done something wrong when upgrading from version 8.2a. I will try changing the code before I go back to version 8.2a.
This problem was solved for me by changing the two lines of code as described above.
Coeus wrote:There is still no disk space information being returned for either windows or linux.
This is still working for me on my 0.8.3a installation. Are you saying that when you execute the data query against these hosts, you get no partitions in return? What data queries are you using for your Linux and for your Windows servers?

-Ian
User avatar
golemb
Posts: 30
Joined: Mon Jun 02, 2003 12:47 pm

Post by golemb »

Thanks Rax for the code change you posted. :D After changing the code the CPU and disk volume information is displayed in the polling host screen. Also the disk space graphs still do not display anything but a X red. The CPU graphs work for my systems that have dual CPUs but not for a single CPU system? When I try to create the graph for a single processor unit the only thing that I can see is the IndexType drop down list is empty.

Create 1 Graph from SNMP Query

SNMP Query [SNMP - Get Processor Information]
Host MIB - CPU Utilization -> Index Type
The data for each new graph will be indexed off of the following field. Certain fields may have been removed from the list if they do not contain unique data. It is best to choose a field whose value never changes.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

golemb wrote:Also the disk space graphs still do not display anything but a X red.
What happens if you delete the disk space data sources/graphs and re-create them? Do these items appear in your poller cache?
golemb wrote:The CPU graphs work for my systems that have dual CPUs but not for a single CPU system? When I try to create the graph for a single processor unit the only thing that I can see is the IndexType drop down list is empty.
That was an interesting enough bug. To fix, open up 'include/database.php' and change line 129 from:

Code: Select all

if (empty($array{count($array)-1})) {
to:

Code: Select all

if ((empty($array{count($array)-1})) && (sizeof($array) > 1)) {
-Ian
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

raX wrote:
This problem was solved for me by changing the two lines of code as described above.
Coeus wrote:There is still no disk space information being returned for either windows or linux.
This is still working for me on my 0.8.3a installation. Are you saying that when you execute the data query against these hosts, you get no partitions in return? What data queries are you using for your Linux and for your Windows servers?

-Ian
The code fix allowed me to query for the partitions and create the graphs - Just that no data is being returned.

Since that post i've got the linux partitions working using the "ucd/net Hard Drive Space" query, but I cant get data back from the Generic SNMP query (Problem wih local MIB...?) for either linux or win2k server.

Thanks for the help

Carl
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Coeus wrote:The code fix allowed me to query for the partitions and create the graphs - Just that no data is being returned.
This part does appear to work for me. If you look at your poller cache, what is Cacti trying to execute to gather CPU data?

-Ian
Guest

Post by Guest »

raX wrote:
Coeus wrote:The code fix allowed me to query for the partitions and create the graphs - Just that no data is being returned.
This part does appear to work for me. If you look at your poller cache, what is Cacti trying to execute to gather CPU data?

-Ian
CPU data is ok. Its the disk space thats causing problems.

The poller cache shows the following for the disk space queries.

Data Source: Exchange - Used Space - C: Label: Seri
RRD: /export/software1/www/cacti/rra/exchange_hdd_used_63.rrd
Action: 1, Script: /usr/bin/php -q /export/software1/www/cacti/scripts/query_host_partitions.php ip.address cString get total 2

Running that manually gives: 18161414144 Which looks correct to me, but doesn't update the graph.

Cheers

Carl
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

*mutters about timeouts...*

Could we be running into a max problem? I cant seem to find where to set the max value.

that drive is only 17G but I have up to 200G partitions i'm trying to get data on.

Carl
*randomly thowing out ideas...*
User avatar
golemb
Posts: 30
Joined: Mon Jun 02, 2003 12:47 pm

Post by golemb »

That was an interesting enough bug. To fix, open up 'include/database.php' and change line 129 from:

Code: Select all

if (empty($array{count($array)-1})) {
to:

Code: Select all

if ((empty($array{count($array)-1})) && (sizeof($array) > 1)) {
-Ian
Thanks Ian that fixed the CPU graph problem. It now puts an index value and the graph displays. Very happy :D Still having problems getting the disk space graph to work. The drive volumes are displayed in the polling host but in graph management debug screen I get the error
ERROR: opening '/var/www/html/cacti/rra/w2k3_pdc_hdd_used_43.rrd': No such file or directory Something is causing it not to create the rrd file?

I have tried clearing the polling cache and in the view poller cache I have the following value of 3 for the system I am graphing disk space. I am assuming this means it is getting a meaningfull return value.

Data Source: W2k3 PDC - Used Space - D: Label: Seri
RRD: /var/www/html/cacti/rra/w2k3_pdc_hdd_used_43.rrd
Action: 1, Script: /usr/bin/php -q /var/www/html/cacti/scripts/query_host_partitions.php 192.168.x.x tpublic get total 3

I hope that I have provided enough information for you. If not please ask. Thanks again for such a great product. 8)
eyechart
Posts: 49
Joined: Thu Apr 25, 2002 11:48 pm

Post by eyechart »

I have applied the patches suggested, but I am stil having problems querying my win2k boxes (from a mandrake 9.1 linux host running cacti).

Any suggestions on how to troubleshoot this? btw, the query for SNMP Interface Statistics (using generic SNMP enabled host) works flawlessly.

Thanks.


-ec
Coeus
Cacti User
Posts: 51
Joined: Mon Aug 04, 2003 8:46 pm
Location: Perth - Western Australia

Post by Coeus »

Golemb,

It sounds very much like you have the same issue as me. i've found the folowing further symptoms.

1) The rrd file for disk space is never created.
2) The SNMP Poller cache is missing the OID for hard disk space, for all generic SNMP queries.

Looking at the database and doing: select * from host_snmp_cache; I get

| host_id | snmp_query_id | field_name | field_value | snmp_index | oid |
| 6 |8 | hrStorageDescr | H: | 7 | |

Golemb - do you see the same symptoms?(ie no oid in the cache)

raX - Would manually instering the oid into this table fix the problem? Which file are the rrds created?

Thanks

Carl
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

golemb wrote:I have tried clearing the polling cache and in the view poller cache I have the following value of 3 for the system I am graphing disk space. I am assuming this means it is getting a meaningfull return value.

Data Source: W2k3 PDC - Used Space - D: Label: Seri
RRD: /var/www/html/cacti/rra/w2k3_pdc_hdd_used_43.rrd
Action: 1, Script: /usr/bin/php -q /var/www/html/cacti/scripts/query_host_partitions.php 192.168.x.x tpublic get total 3
Sounds like we might be running into a max problem (like suggested above). My recommendation is that you go to "Data Templates" and select "Host MIB - Hard Drive Space". Change the maximum value here from '10000000000' to '0' for both hdd_total and hdd_used. Then re-run cmd.php and see if you get any .rrd files this time.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests