# Cacti not showing graphs [Solved]

## cpaasche

Hi,

I have Cacti installed on my Gentoo box.  I am getting snmpwalk output from it.  Also, a Windows XP box & Windows 2000.

```
Cisco_7200 cacti # snmpwalk -v 1 -c community 192.168.100.182 .1.3.6.1.2.1.1.1.0

SNMPv2-MIB::sysDescr.0 = STRING: Linux Cisco_7200 2.6.19-gentoo-r5 #3 SMP Sun Feb 11 23:33:09 PST 2007 i686

Cisco_7200 cacti # snmpwalk -v 1 -c community 127.0.0.1 .1.3.6.1.2.1.1.1.0

SNMPv2-MIB::sysDescr.0 = STRING: Linux Cisco_7200 2.6.19-gentoo-r5 #3 SMP Sun Feb 11 23:33:09 PST 2007 i686

Cisco_7200 cacti # snmpwalk -v 1 -c community localhost .1.3.6.1.2.1.1.1.0

SNMPv2-MIB::sysDescr.0 = STRING: Linux Cisco_7200 2.6.19-gentoo-r5 #3 SMP Sun Feb 11 23:33:09 PST 2007 i686
```

I'm using Vixie-cron

```
Cisco_7200 cacti # crontab -u cactiuser -e

#*/5 * * * * php /var/www/localhost/htdocs/cacti/poller.php > /var/www/localhost/htdocs/cacti/poller.php 2>&1

*/5 * * * * php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1
```

First line when uncommented just gives me email error messages in /var/log/messages so I figure it's not related.

Second line gives me this.

```
May  5 19:20:01 Cisco_7200 cron[8175]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

May  5 19:20:01 Cisco_7200 cron[8178]: (cactiuser) CMD (php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1)

May  5 19:25:01 Cisco_7200 cron[8275]: (cactiuser) CMD (php /var/www/localhost/htdocs/cacti/poller.php > /dev/null 2>&1)

```

From:  Console -> Devices -> (Edit)

```

Localhost (localhost)

SNMP Information

System: 00:LINUX:CISCO_7200:2.6.19-GENTOO-R5:#3:SMP:SUN:FEB:11:23:33:09:PST:2007:I686

Uptime: 447798 (0 days, 1 hours, 14 minutes)

Hostname: Cisco_7200

Location: MyLocation

Contact: Me me@somewhere.org
```

http://img515.imageshack.us/img515/7031/cactilocalhostsetupuv2.th.png

Gentoo howto says....

```
chown -R apache:apache rra/ log/
```

Tried that, didn't work so I did as in the Cacti User Manual.

```
Cisco_7200 cacti # chown -R cactiuser:cactiuser rra/ log/

```

Everything else is root...is that correct?     Or should it be cactiuser as owner?

```
drwxr-xr-x 2 root      root        1928 May  4 22:35 images

drwxr-xr-x 5 root      root         528 May  4 22:40 include

-rw-r--r-- 2 root      root        2271 May  4 22:35 index.php

drwxr-xr-x 2 root      root         664 May  4 22:35 install

drwxr-xr-x 2 root      root         968 May  4 22:35 lib

drwxr-xr-x 2 cactiuser cactiuser     80 May  4 22:35 log

-rw-r--r-- 2 root      root        1796 May  4 22:35 logout.php

-rw-r--r-- 2 root      root           0 May  5 11:33 poller.php

-rw-r--r-- 2 root      root        4462 May  4 22:35 poller_commands.php

-rw-r--r-- 2 root      root        2399 May  4 22:35 poller_export.php

-rw-r--r-- 2 root      root        4417 May  4 22:35 poller_reindex_hosts.php

-rw-r--r-- 2 root      root        4244 May  4 22:35 rebuild_poller_cache.php

drwxr-xr-x 5 root      root         144 May  4 22:35 resource

drwxr-xr-x 2 cactiuser cactiuser     80 May  4 22:35 rra

-rw-r--r-- 2 root      root        7236 May  4 22:35 rra.php

-rw-r--r-- 2 root      root        7363 May  4 22:35 script_server.php

-rw-r--r-- 2 root      root         353 May  4 22:35 script_server.pl
```

poller.php, rra/ & log/ are empty

```

Cisco_7200 cacti # ls -l log/ rra/ resource/

log/:

total 0

-rw-rw-r-- 1 cactiuser cactiuser 0 May  4 22:35 cacti.log

resource/:

total 0

drwxr-xr-x 2 root root 144 May  4 22:35 script_queries

drwxr-xr-x 2 root root 112 May  4 22:35 script_server

drwxr-xr-x 2 root root 248 May  4 22:35 snmp_queries

rra/:

total 0

Cisco_7200 cacti #
```

RRDTool

```
ERROR: opening '/var/www/localhost/htdocs/cacti/rra/localhost_load_1min_5.rrd': No such file or directory
```

After looking at this forum, the Cacti forum, Gentoo Wiki & the howtos on the Cacti site, I get as far as this when looking at the Data Query Debug Information.  Associated Data Queries shows success as status with 27 items in 3 rows.

```
Data Query Debug Information

+ Running data query [1].

+ Found type = '3' [snmp query].

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ XML file parsed ok.

+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'

+ Located input field 'ifIndex' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1'

+ Found item [ifIndex='1'] index: 1 [from value]

+ Found item [ifIndex='2'] index: 2 [from value]

+ Found item [ifIndex='3'] index: 3 [from value]

+ Located input field 'ifOperStatus' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.8'

+ Found item [ifOperStatus='Up'] index: 1 [from value]

+ Found item [ifOperStatus='Down'] index: 2 [from value]

+ Found item [ifOperStatus='Up'] index: 3 [from value]

+ Located input field 'ifDescr' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2'

+ Found item [ifDescr='MS TCP Loopback interface'] index: 1 [from value]

+ Found item [ifDescr='11a/b/g Wireless LAN Mini PCI Express Adapter - Packet Scheduler Miniport'] index: 2 [from value]

+ Found item [ifDescr='Broadcom NetXtreme Gigabit Ethernet - Packet Scheduler Miniport'] index: 3 [from value]

+ Located input field 'ifName' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1'

+ Located input field 'ifAlias' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18'

+ Located input field 'ifType' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'

+ Found item [ifType='softwareLoopback(24)'] index: 1 [from value]

+ Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value]

+ Found item [ifType='ethernetCsmacd(6)'] index: 3 [from value]

+ Located input field 'ifSpeed' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5'

+ Found item [ifSpeed='10000000'] index: 1 [from value]

+ Found item [ifSpeed='54000000'] index: 2 [from value]

+ Found item [ifSpeed='100000000'] index: 3 [from value]

+ Located input field 'ifHwAddr' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6'

+ Found item [ifHwAddr=''] index: 1 [from value]

+ Found item [ifHwAddr='00:00:16:CE:22:6A:68'] index: 2 [from value]

+ Found item [ifHwAddr='00:00:16:36:30:66:D0'] index: 3 [from value]

+ Located input field 'ifIP' [walk]

+ Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2'

+ Found item [ifIP='0.0.0.0'] index: 2 [from regexp oid parse]

+ Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse]

+ Found item [ifIP='192.168.100.232'] index: 3 [from regexp oid parse]

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'

+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/interface.xml'
```

http://img72.imageshack.us/img72/1664/cactinographsjd3.th.png

All the output is not from the same snmp host but I get the same one all of them.  snmpwalk works.  Data Debug Query is populated.  No charts & "'/var/www/localhost/htdocs/cacti/rra/localhost_load_1min_5.rrd': No such file or directory"

Hosts say either down or unknown in Console -> Devices

Thanks in advance.

----------

## cpaasche

I've got this solved.

First off, I had to add bundled-adodb to my /etc/make.conf file & recompile cacti.  That brought up the systems & updated the stats in Console -> Devices.

Next, I had to run "php poller.php" from the cacti directory as root....as the apache user it did not work.  That populated the rra/ directory.  Then I changed permissions of rra/ & log/ back to apache.

I was getting mysql insert errors in my log files but at least I had output as was not the case previously.

I added a cronjob for the Apache & killed the job for cactiuser.  I wasn't clear on that point.

Lastly, I experimented with permissions.  mysql, apache & cactiuser (& groups).  I'll start pulling users out of groups & see when it breaks.

Basically A LOT of howto & forum reading did the trick along with the troubleshooting walkthrus at the Cacti forums.

----------

