Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Mar 22, 2019 11:39 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 3:49 pm 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Hey! So we stepped each other again haha

So here's what I get on the main graph section.

Image

Everything's the same though, how do I check the timestamps on files? It looks like poll is still not running by itself :D


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 3:54 pm 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 223
Location: Long Island, New York, USA
Not sure if you saw the addition I made to the last post so here it is again:

Added***
I see that the -nan- are related to the graphs that were not green. In the
Code:
/usr/share/cacti/rra
folder, try the below command:
Code:
# chmod +x *
This will allow the files to be executed. I see mine are while yours are not.

Not sure of your time zone, but is the time correct?

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.2 @ CentOS 7-6.1810.2.el7
Test: Cacti 1.2.2 @ CentOS 7-6.1810.2.el7


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 3:56 pm 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 223
Location: Long Island, New York, USA
Quote:
How do I check the timestamps on files? It looks like poll is still not running by itself :D


Code:
# ls -l
The equivalent of Windoze 'dir' command.

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.2 @ CentOS 7-6.1810.2.el7
Test: Cacti 1.2.2 @ CentOS 7-6.1810.2.el7


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 4:07 pm 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Thanks again for following up!

This is what I have now:

Image

I additionally created another device, and graphs to be shown, another Windows 10 Host, configuring community and Cacti's server IP address as the main server:

Received this:

Image

Looks like apache is still having problems writing files to that directory even though they're all green now...could it be that it isn't Apache who's writing the files? :O


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 4:09 pm 
Online
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2285
Right, several things here. 'admin' user is NOT the user that is running the poller. That is the website administrative user.

The poller is probably running as cacti not apache. It's rare that people have the poller configured to use the website user unless they have manually configured it and skipped most tutorials. Most package installations also user a specific user for the poller.

The poller user should be part of the web server's group (apache or www-data).

The folders above should be 775 and the files 664. Easy way to handle that with chmod these days is chmod g+w

If SELinux is enable (which it is by default in CentOS 7) then you also need to change the context of the cacti folders that need to be written to.

Code:
semanage fcontext -a -t httpd_sys_content_t "/usr/share/cacti(/.*)?"
semanage fcontext -a -t httpd_sys_rw_content_t "/usr/share/cacti/(.*)/((log|rra|resource|scripts|cache)(/.*)?)"
semanage fcontext -a -t httpd_sys_content_t "/usr/share/cacti/.*/.htaccess"
restorecon -R -v /usr/share/cacti

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Fri Mar 01, 2019 4:22 pm 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
netniV wrote:
Right, several things here. 'admin' user is NOT the user that is running the poller. That is the website administrative user.

The poller is probably running as cacti not apache. It's rare that people have the poller configured to use the website user unless they have manually configured it and skipped most tutorials. Most package installations also user a specific user for the poller.

The poller user should be part of the web server's group (apache or www-data).

The folders above should be 775 and the files 664. Easy way to handle that with chmod these days is chmod g+w

If SELinux is enable (which it is by default in CentOS 7) then you also need to change the context of the cacti folders that need to be written to.

Code:
semanage fcontext -a -t httpd_sys_content_t "/usr/share/cacti(/.*)?"
semanage fcontext -a -t httpd_sys_rw_content_t "/usr/share/cacti/(.*)/((log|rra|resource|scripts|cache)(/.*)?)"
semanage fcontext -a -t httpd_sys_content_t "/usr/share/cacti/.*/.htaccess"


Hello thanks for joining and helping!

SELinux is permissive, so should I do that anyway?

How can I check the poller's not running under "apache"? I'm suspecting the same thing!

So usr/sbib/httpd should be chmod 775 and the rrd files should be 664? Should I change that?


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Mon Mar 04, 2019 8:46 am 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Any thoughts? :cry:


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Mon Mar 04, 2019 10:00 am 
Online
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2285
try running the poller interactively, see if there are any errors:

Code:
sudo -u cacti /usr/bin/php /usr/share/cacti/poller.php

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Mon Mar 04, 2019 4:34 pm 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Hey, thanks for getting back to this problem.

I tried the command provided, this is what I get:

Image

I'm guessing this is because Cacti as a user does not have permissions, now isn't it Apache the user that based on instructions and images above should have those permissions?

Thanks for reaching out again!

I'm guessing the SEManage command does not work as SELinux is already permissive, correct me if I'm wrong.

Edit: This is what I get when running it as Apache:

Image


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Tue Mar 05, 2019 6:54 am 
Online
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2285
If you wish to run the poller as Apache, make sure the /etc/cron.d/cron file says apache not cacti.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Tue Mar 05, 2019 9:37 am 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Yes, it is Apache the user that's on the file.

Should we review other files maybe? such as Apache config? the database? Running out of ideas now.

I tried replicating the issue on another VM following another installation guide, and it's the same thing.

It's weird that these type of errors are not covered in any of the installation guides I've seen so far


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Tue Mar 05, 2019 10:47 am 
Online
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2285
You might be better getting someone to provide some proper remote support on this. It shouldn't take too long to resolve and being on the server in question makes life a lot simplier.

It's not quite clear yet which part of the puzzle is slightly out of line given all the common stuff has been mentioned already above.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Graphs Only Showin -nan Values
PostPosted: Tue Mar 05, 2019 12:07 pm 
Offline

Joined: Thu Feb 28, 2019 12:37 am
Posts: 16
Sure, I'm willing to receive that type of help, how can I get in contact with someone?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group