Setup Cacti on Subdomain with RRDTool error

  • Hello,
    i want to install Cacti in Debian on a Subdomain. I download cacti 0.8.8a extract and save in webroot for the subdomain, create MySQL DB and User. I installed rrdtool from apt and can start the Installer in Web. But in the Settings the path to rrdtool and snmpwalk ... are not found. All are in /usr/bin, but i got errors -> [ERROR: FILE NOT FOUND].


    After searching i think its a permission thing, but i dont know where and how to set it up safely. Can anyone help?

  • Go 10 minutes inside you and have a thought about PATH, open_basedir and php.ini.
    Then you will find the solution by yourself.
    Sorry... Why do all people use a panel for shared hosting and then they want to install a monitoring tool?
    I don't understand this... But just my 2 cent...

  • Hello,
    yes i checked the php.ini and the open_basedir restriction, but iam not sure with this and therefore i wanted to ask the pros ;) Thx for pointing to this and while i was there i will directly ask what in detail i have to do. in theory i have to add a sumlink to the chroot dir and add the path in /var/www/fcgi/domain/php5/php.ini like this open_basedir = "/var/www/virtual/domain/subdomain:/usr/share/php:/usr/share/rddtool" right?


    Sorry i search for rrdtool and i-mscp or cacti or chroot over houres but didnt find any explaining solution. And of course your right whit using monitoring tools on sharedserver / hosting, but perhaps i will only test it befor buy another one ;), but your right.

  • In my server world is nagios/icinga the tool to monitor a server.
    Cacti is for using in the network world. Monitoring switches or routers. For that cacti is very cool. But if you want to monitor server us a tool what is designed for that.


    About your paths... I don't know which pathes have to be added. For such problem i need to reed logfiles..

  • Hello,
    i know the difference between both and i want to log disk size, cpu usage network traffic and so on and therefor cacti is good. but your right if i would monitor downtimes and want to informed i would use icinga.


    I got it work for rrdtool. i copy the rrdtool file in /usr/share/rrdtool and add on open_basedir :/usr/share/rrdtool. This works but not for snmpwalk and the other needed one. is this doing correct or would an symlink help as well? ok i see at this moment that symlink is permitted by disable_functions ;I am i right?


    thx TheCry


    edit: which path have i choose for php? the basedir say /usr/share/php, but cacti say its an dir and i think it expected the binaries, or?

    Edited once, last by Sunghost ().

  • Hi,
    now all paths work except for php. The binary lays in /usr/share/php or not?
    [hr]
    edit: How is the construct of the permission for that. the webuser in which the files of cacti lay are vuxxx and the rights for /usr/share/* are root. if i run from bash as root or as vux the poller.php i get permission denied, but i dont know which user is for what, can someone help?

    Edited once, last by Sunghost ().

  • How is the construct of the permission for that. the webuser in which the files of cacti lay are vuxxx and the rights for /usr/share/* are root. if i run from bash as root or as vux the poller.php i get permission denied, but i dont know which user is for what, can someone help?


    vuXXXX are the domain users from imscp.
    You could run the poller in cron from www-data, vuXXXX or even create a special cacti user if you want. If I remember correctly I have it running as www-data as this is the Debian default. If possible I try to prevent running anything as root.


    But however you do it, just make sure the permissions on the poller.php file and /var/log/cacti/ are correct. Also check the logrotate if you change any permissions!


    Permissions on the php bin (/usr/bin/php) shouldn't be a problem.

  • I gave you a thx for your constructive answer. i tried www-data and actually vuxxx but without positiv result. have i restart anything after edit crontab? actually i try to debug cacti and found out, that the mem var is set up do 512m for php, what is to much for my server configuration and i changed it. now i will test further.


    edit: about permission - in open_basedir is an entry for the php dir and the owner are root, while www is vuxxx but this is no problem or how must i interprete it?

    Edited once, last by Sunghost ().

  • So your cron job with the poller.php is not working? What error do you get? Look at the different log files (syslog, cacti, ..)

  • Syslog:

    Quote

    (vuxx) CMD (/usr/share/php /var/www/virtual/domain.de/subdomain/htdocs/poller.php > /dev/null 2>&1)
    /USR/SBIN/CRON[13259]: (CRON) error (grandchild #13260 failed with exit status 126)


    edit:
    mainproblem is still the path to php binary, i tried /usr/share/php which is written as open_basedir by default. you wrote /usr/bin/php, should i add this to open_basedir?

    Edited once, last by Sunghost ().