Polling error - No graph shown

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Lucas Rey
Posts: 19
Joined: Fri Oct 22, 2010 2:49 am

Polling error - No graph shown

Post by Lucas Rey »

Hello all,
I'm a new cacti user and I'm tryng to do a simple graph using a script that show 3 simple values...

I followed a simple guide:
1) Create Data Input Method (just an shell script from ubuntu)
2) Create Data Source
3) Create a Graph

The graph is shown on debug window, but no data is there. For sure, the bash script works without problem and show the three values!

From the cacti log I seen:

Code: Select all

03/02/2011 11:41:19 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select id,column_name from graph_template_input where graph_template_id="  
03/02/2011 11:40:02 PM - SYSTEM STATS: Time:1.1434 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:9  
03/02/2011 11:40:02 PM - CMDPHP: Poller[0] Host[0] DS[15] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:40:02 PM - CMDPHP: Poller[0] Host[0] DS[14] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:40:02 PM - CMDPHP: Poller[0] Host[0] DS[13] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:40:02 PM - CMDPHP: Poller[0] Host[0] DS[12] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:37:35 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select id,column_name from graph_template_input where graph_template_id="  
03/02/2011 11:35:02 PM - SYSTEM STATS: Time:1.1884 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:9  
03/02/2011 11:35:01 PM - CMDPHP: Poller[0] Host[0] DS[15] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:35:01 PM - CMDPHP: Poller[0] Host[0] DS[14] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:35:01 PM - CMDPHP: Poller[0] Host[0] DS[13] WARNING: Result from CMD not valid. Partial Result: U  
03/02/2011 11:35:01 PM - CMDPHP: Poller[0] Host[0] DS[12] WARNING: Result from CMD not valid. Partial Result: U  

Could someone help me to understand what's the problem ???

Thanks!!
Lucas Rey
Posts: 19
Joined: Fri Oct 22, 2010 2:49 am

Re: Polling error - No graph shown

Post by Lucas Rey »

Well I found the problem on "user permission" because the script take a file from other host and then show the values inside. The problem is that probably cacti have no permission to write the file and then show it...

Now my question is? I don't create any user for cacti on the system, which user cacti use for executing the script?
So I can adjust the right permission!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Polling error - No graph shown

Post by noname »

Lucas Rey wrote: I don't create any user for cacti on the system, which user cacti use for executing the script?
Install and Configure Cacti
Please see step 6 & 7.
Lucas Rey
Posts: 19
Joined: Fri Oct 22, 2010 2:49 am

Re: Polling error - No graph shown

Post by Lucas Rey »

noname wrote:
Lucas Rey wrote: I don't create any user for cacti on the system, which user cacti use for executing the script?
Install and Configure Cacti
Please see step 6 & 7.
Thanks for reply, btw I already seen that manual section, expecially:

Code: Select all

chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser)
But, the simple question is: Which is the valid username for cacti ?? :-?

I'm running cacti from Ubuntu, and seems I solved assigning the permission to the following user: www-data
Is this correct? Do I need to create a new user?
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Polling error - No graph shown

Post by noname »

Lucas Rey wrote:But, the simple question is: Which is the valid username for cacti ?? :-?

I'm running cacti from Ubuntu, and seems I solved assigning the permission to the following user: www-data
Is this correct? Do I need to create a new user?
RRD files are created by poller.
So when you assigned permissions to www-data for these directories,
if you run poller process as www-data user (= assign poller.php to www-data's crontab), then Cacti can create RRD files.
Otherwise, you may run poller as root user. That will work, too.

However, for security reasons, I think that poller process should be separated from access via web and high privilege (like super-user).


Note: For logging your operations on Cacti Web UI, it need permissions that www user can write to log/ directory.
Lucas Rey
Posts: 19
Joined: Fri Oct 22, 2010 2:49 am

Re: Polling error - No graph shown

Post by Lucas Rey »

Well, that's the problem... To install cacti I used the automatic script from apt-get. Probably it set the cacti user as www-data, so the file permission must be set accordingly with that user.

Btw, is there a way to setup another cacti user? I think is not necessary, just to know!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Polling error - No graph shown

Post by noname »

I think if www user has permission to rra/ directory and Apache allows directory listing,
anyone may see/download your rrd files when access http://server/cacti/rra/ without authentication...
Lucas Rey wrote:Btw, is there a way to setup another cacti user? I think is not necessary, just to know!
For example,

[/etc/passwd]
cactiuser:x:<UID>:<GID>:Cacti User:/:

[/etc/shadow]
cactiuser:NP:::::::

and

# chown -R cactiuser rra/ log/

# crontab -e cactiuser
(set schedule for 'poller.php')
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests