Description of problem: non working graphs after upgrading from cacti 0.8.6g to 0.8.6h-6 from fedora extras. graph some disk space. it works upgrade with this rpm other graphs works but these graph stops to work. Additional info: os is redhat enterprise 3.0ES + updates (rpm locally compiled from src.rpm) old cacti is locally compiled from src.rpm with cacti-0.8.6g-1.rf.src.rpm from dag symptom : in cacti logs, errors with partial results to see the pb : launch php -q script-server in /usr/share/cacti type the command line seen in the cacti log file (ss_host_disk...) error message about cacti snmp function missing after checking the function exist in lib/snmp.php origin of problem : in /usr/share/cacti/scripts/ss_host_disk.php line include_once(dirname(__FILE__) . "/../lib/snmp.php"); goes to /var/lib/cacti/lib which does not exist instead of /usr/share/cacti/lib workaround : cd /var/lib/cacti ln -s /usr/share/cacti/lib solution : either package the rpm so everything is under a commmon directory, or make some links, or change the include in scripts to remove the ../ and use the good path. remark : the problem may also occurs with the cacti include directory
Can you recreate this with Fedora Core 4/5? Also what is the output from: ls -l /usr/share/cacti/
I don't have any fedora core 4/5 installed. Nevertheless, I have two cacti installations.(same os RHES 3, same install) I still have one with the old version of Cacti. (I can't change the config easily on this server as it is in a production environnement with very strict rules but I can have a look on the cacti config on it) I have on server where I upgraded cacti with your rpm. This is where I had the problem. Once every thing is stable on this server, we'll migrate the config to the production server. On this server : ls -l /usr/share/cacti total 620 -rw-r--r-- 1 root root 5892 Feb 28 15:46 about.php -rw-r--r-- 1 root root 4773 Feb 28 15:46 auth_changepassword.php -rw-r--r-- 1 root root 6189 Feb 28 15:46 auth_login.php -rw-r--r-- 1 root root 13108 Feb 28 15:46 cdef.php -rwxr-xr-x 1 root root 16569 Feb 28 15:46 cmd.php -rw-r--r-- 1 root root 5917 Feb 28 15:46 color.php -rw-r--r-- 1 root root 2753 Feb 28 15:46 copy_cacti_user.php -rw-r--r-- 1 root root 17536 Feb 28 15:46 data_input.php -rw-r--r-- 1 root root 28164 Feb 28 15:46 data_queries.php -rw-r--r-- 1 root root 43802 Feb 28 15:46 data_sources.php -rw-r--r-- 1 root root 30344 Feb 28 15:46 data_templates.php -rw-r--r-- 1 root root 6110 Feb 28 15:46 gprint_presets.php -rw-r--r-- 1 root root 3423 Feb 28 15:46 graph_image.php -rw-r--r-- 1 root root 10498 Feb 28 15:46 graph.php -rw-r--r-- 1 root root 6319 Feb 28 15:46 graph_settings.php -rw-r--r-- 1 root root 11945 Feb 28 15:46 graphs_items.php -rw-r--r-- 1 root root 30752 Feb 28 15:46 graphs_new.php -rw-r--r-- 1 root root 46835 Feb 28 15:46 graphs.php -rw-r--r-- 1 root root 10097 Feb 28 15:46 graph_templates_inputs.php -rw-r--r-- 1 root root 17367 Feb 28 15:46 graph_templates_items.php -rw-r--r-- 1 root root 22578 Feb 28 15:46 graph_templates.php -rw-r--r-- 1 root root 23122 Feb 28 15:46 graph_view.php -rw-r--r-- 1 root root 33450 Feb 28 15:46 host.php -rw-r--r-- 1 root root 14236 Feb 28 15:46 host_templates.php drwxr-xr-x 2 root root 4096 Feb 28 15:47 images drwxr-xr-x 5 root root 4096 Feb 28 16:07 include -rw-r--r-- 1 root root 2271 Feb 28 15:46 index.php drwxr-xr-x 2 root root 4096 Feb 28 15:47 install drwxr-xr-x 3 root root 4096 Feb 28 15:47 lib lrwxrwxrwx 1 root root 15 Feb 28 15:47 log -> /var/log/cacti/ -rw-r--r-- 1 root root 1796 Feb 28 15:46 logout.php -rw-r--r-- 1 root root 4673 Feb 28 15:46 poller_commands.php -rw-r--r-- 1 root root 2325 Feb 28 15:46 poller_export.php -rwxr-xr-x 1 root root 9441 Feb 28 15:46 poller.php -rw-r--r-- 1 root root 4343 Feb 28 15:46 poller_reindex_hosts.php -rw-r--r-- 1 root root 4170 Feb 28 15:46 rebuild_poller_cache.php drwxr-xr-x 5 root root 4096 Feb 28 15:47 resource lrwxrwxrwx 1 root root 18 Feb 28 15:47 rra -> /var/lib/cacti/rra -rw-r--r-- 1 root root 6622 Feb 28 15:46 rra.php lrwxrwxrwx 1 root root 22 Feb 28 15:47 scripts -> /var/lib/cacti/scripts -rw-r--r-- 1 root root 6760 Feb 28 15:46 script_server.php -rw-r--r-- 1 root root 4833 Feb 28 15:46 settings.php -rw-r--r-- 1 root root 6813 Feb 28 15:46 templates_export.php -rw-r--r-- 1 root root 5954 Feb 28 15:46 templates_import.php -rw-r--r-- 1 root root 17463 Feb 28 15:46 tree.php -rw-r--r-- 1 root root 27829 Feb 28 15:46 user_admin.php -rw-r--r-- 1 root root 11388 Feb 28 15:46 utilities.php
I cannot recreate this problem, all of my disk checking graphs work just fine. When you installed the my cacti, did you copy the old config over the new one or just edit the config.php to match the new settings?
I just edited the new config file. Perhaps ../ is not treated the same by php. rhel3 seems to ask the os for the .. directory which goes to /var/lib/cacti your version seems to just remove one level, which goes to /usr/share/cacti perhaps the right solution would be to reconstruct the path from base + suffix and not use .. in the scripts. That would work for all cases.
I just did this with a fresh install on RHEL4 and it seems to work just fine, the issue seems to be upgrading from whatever was installed there before. Your best bet is probably to remove the old rpm, remove any directories left over (make a copy of any scripts you are using). Then install the new RPM and copy those scripts to the new script directory. Make a backup of your rra files and all that.
Can I close this bug?
Yes