Main Pollor unknown/Down
Moderators: Developers, Moderators
Main Pollor unknown/Down
Hi All,
I have installed cacti version 1.1.35 and 1.1.36.
Then I added some devices and added some graphs. I have set the pollor interval for 5 minutes.
And cron job also for 5 minutes.
*/5 * * * * php /path/cacti/poller.php
But non of the graphs didn't start drawing any thing. Graph was empty. Even it did not start drawing local machine graphs.
I set user and group to www-data for all the files in cacti directory. Re-built SNMP and Pollor(by running pollor.php) few times. But non of them worked. And restarted all service and changed cron job user for root and cacti and www-data. But graph were empty.
Then I removed all the files belong cacti 1.1.35 and dropped the cacti database and db user. Then I installed version 1.1.27 and imported the cacti database and created user.
Then I restarted all serveries and re-built SNMP cache and pollor. Then I change user and group to www-data for all files in Cacti directory.
Then I added new device and new graphs. This was the same device I tried for 1.1.35 and 1.1.36 versions.
And re-built the pollor(by running pollor.php). I have set the pollor interval for 5 minutes.
And cron job also for 5 minutes. same cron job as early situations.
Then graphs were created. And started drawing. Everything showing OK. But Still Main Poller status is unknown/down.
Can anyone explain what is the wrong here? and any advice?
I have installed cacti version 1.1.35 and 1.1.36.
Then I added some devices and added some graphs. I have set the pollor interval for 5 minutes.
And cron job also for 5 minutes.
*/5 * * * * php /path/cacti/poller.php
But non of the graphs didn't start drawing any thing. Graph was empty. Even it did not start drawing local machine graphs.
I set user and group to www-data for all the files in cacti directory. Re-built SNMP and Pollor(by running pollor.php) few times. But non of them worked. And restarted all service and changed cron job user for root and cacti and www-data. But graph were empty.
Then I removed all the files belong cacti 1.1.35 and dropped the cacti database and db user. Then I installed version 1.1.27 and imported the cacti database and created user.
Then I restarted all serveries and re-built SNMP cache and pollor. Then I change user and group to www-data for all files in Cacti directory.
Then I added new device and new graphs. This was the same device I tried for 1.1.35 and 1.1.36 versions.
And re-built the pollor(by running pollor.php). I have set the pollor interval for 5 minutes.
And cron job also for 5 minutes. same cron job as early situations.
Then graphs were created. And started drawing. Everything showing OK. But Still Main Poller status is unknown/down.
Can anyone explain what is the wrong here? and any advice?
Re: Main Pollor unknown/Down
You have specified 'php' as a user because you have missed off the user I suspect.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
Without 'php' part we cannot run 'poller.php', right?
Re: Main Pollor unknown/Down
Actually, most PHP files in cacti that are designed to run from the command line, will also have a 'shbang' at the top of the file to tell the system to use PHP to run it.
So even without the PHP before the scriptname if the script was +x it will run directly, be parsed by the shell to use PHP, call PHP with the script name as a parameter.
The cron is wrong though because of this is the normal syntax most people use with the poller cron:
You are missing the user.
So even without the PHP before the scriptname if the script was +x it will run directly, be parsed by the shell to use PHP, call PHP with the script name as a parameter.
The cron is wrong though because of this is the normal syntax most people use with the poller cron:
Code: Select all
*/5 * * * * <user> php /path/cacti/poller.php > /dev/null &2>1
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
Ok, So I should mention the user here. It is www-data or root or cacti? how can I decide it?
So is this the problem that Main poller is in "unknown/down" status?
So is this the problem that Main poller is in "unknown/down" status?
Re: Main Pollor unknown/Down
Yes, it is because you are missing the user. What OS are you running under?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
It is Ubuntu 16.04 server. I think it should be www-data, right?
Re: Main Pollor unknown/Down
That would be correct to run the poller as your website user.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
It did not work. I changed the user to www-data, cacti and root. But non of them worked as you mention. It cause to stop drawing the graph.
Then again I changed cron job to previous one. (without defining a user). Then it started drawing the graph. But still main poller is unkwon/down status.
Then again I changed cron job to previous one. (without defining a user). Then it started drawing the graph. But still main poller is unkwon/down status.
Re: Main Pollor unknown/Down
Root should never stop the graphing, because root has full access to all files. I am assuming that you are doing this in a file in /etc/cron.d and not via crontab right?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
No I am doing it in crontab.
Re: Main Pollor unknown/Down
Ah, that would explain the difference then. What user are you specifying for the crontab? If you are using Crontab you don't need to specify the user as you've done that at command line.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Main Pollor unknown/Down
Yes, I am using crontab with root permission. Do I need to change it? and How?
Re: Main Pollor unknown/Down
The recommended route is to use a cron file in /etc/cron.d/ normally called cacti. That would use the format that I specified where it runs as a user other than root. Quite often people recommend using the website user to ensure that the permissions and files are readable by both the poller and website.
Using Crontab forces the commands to be run only as root.
Using Crontab forces the commands to be run only as root.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 3 guests