Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Nov 18, 2018 10:28 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Tue Jun 05, 2018 6:47 am 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
After looking into anything with stats or poller, all I could find was the below. Nothing was accessed since I imagine it was installed, hence the last modified date is a year ago. The rebuild_poller_cache script was one I found off googling which is supposed to just make rebuilding the cacti poller easier (on the off chance you didn't know that existed.) Everything is set to 644 as far as permissions which I believe is alright, even if owned by another user:group. Maybe not? Should I try to loosen the chmod permissions on something or chown it to cacti:cacti for example?

Code:
[[email protected]<cacti server FQDN>]$ sudo ls -lahR --color /usr/share/cacti/ | grep -i --color stats
-rw-r--r--    1 root   root   8.4K Nov 19  2017 poller_dsstats.php
-rw-r--r--  1 root root  29K Nov 19  2017 dsstats.php

[[email protected]<cacti server FQDN>]$ sudo ls -lahR --color /usr/share/cacti/ | grep -i --color poller
-rw-r--r--    1 root   root    29K Nov 19  2017 poller_automation.php
-rw-r--r--    1 root   root    15K Nov 19  2017 poller_boost.php
-rw-r--r--    1 root   root   5.4K Nov 19  2017 poller_commands.php
-rw-r--r--    1 root   root   8.4K Nov 19  2017 poller_dsstats.php
-rw-r--r--    1 root   root   3.6K Nov 19  2017 poller_export.php
-rw-r--r--    1 root   root    16K Nov 19  2017 poller_maintenance.php
-rwxr-xr-x    1 root   root    25K Nov 19  2017 poller.php
-rw-r--r--    1 root   root   9.9K Nov 19  2017 poller_realtime.php
-rw-r--r--    1 root   root   8.8K Nov 19  2017 poller_recovery.php
-rw-r--r--    1 root   root   5.6K Nov 19  2017 poller_reports.php
-rw-r--r--    1 root   root    25K Nov 19  2017 pollers.php
-rw-r--r--    1 root   root   7.0K Nov 19  2017 poller_spikekill.php
-rwxr--r--    1 root   root    983 May 24 08:06 rebuild_poller_cache.php
-rw-r--r--  1 root root 5.9K Nov 19  2017 api_poller.php
-rw-r--r--  1 root root  45K Nov 19  2017 poller.php


Again I do want to thank you though, for responding and helping me trouble shoot. I feel I have at least significantly emboldened my ability to express myself in cacti terms with my local team members now.


Top
 Profile  
 
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Tue Jun 05, 2018 10:03 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1693
Script wise, as long as the website user has read permission that is all that is needed. In terms of the scripts running, did you try the sudo command I suggested earlier ? As I don't actually have that script I can't examine it further to suggest where to go next. If you want to test if your system is able to graph, try creating a standard Interface graph for the host.

_________________
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: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Tue Jun 05, 2018 12:43 pm 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
Good news!

After meeting with my local team I was able to fix part of the issue! It pertained directly to ssh again like you mentioned and it was something very small that I know I over looked.

[[email protected]<cacti server FQDN>]$ sudo ls -la /usr/share/cacti/ | grep --color ssh
drwx------ 2 cacti cacti 54 Jun 5 10:28 .ssh

[[email protected]<cacti server FQDN>]$ sudo ls -la /usr/share/cacti/.ssh/
total 20
drwx------ 2 cacti cacti 54 Jun 5 10:28 .
drwxr-xr-x 12 root root 4096 Jun 1 14:45 ..
-rw------- 1 cacti cacti 3243 Jun 1 10:40 id_rsa
-rw------- 1 cacti cacti 765 Jun 1 10:40 id_rsa.pub
-rw-r--r-- 1 cacti cacti 346 Jun 5 10:28 known_hosts

The above bolded text. I am not positive if you brought it up directly or not, however the ".ssh" dir for cacti was set to cacti:cacti but the contents were set to root:root. Which is why ssh kept failing. So now the good news is our cacti server can poll the agent boxes we setup and surprisingly it is graphing :D.



However the issue now is that I still can't get anything to graph for local host, as in the cacti server itself. We diagnosed that it has to be with however the percona setup gathers it's information within the ss_get_by_ssh.php script. I just wish someone with more experience with percona was able to speak up. I'll be reconnecting with my team in a few days time given I can't manage it alone here.


Top
 Profile  
 
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Tue Jun 05, 2018 1:56 pm 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
Also another thing is that if I change the hostname to "<IP Address>" or "<FQDN>" the top SNMP info errors out, however if I use "localhost" I get SNMP info to show but it still doesn't graph.

My host that now is graphing since I fixed the ssh permission issues is listed by IP and works fine.

See attached image


Attachments:
localhostissues.PNG
localhostissues.PNG [ 24.82 KiB | Viewed 142 times ]
Top
 Profile  
 
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Wed Jun 06, 2018 9:52 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1693
I think I know the reason for the SNMP problem, that I can help with. You will find that your SNMP daemon is either configured to listen only on localhost or you have security set so that it only accepts localhost client connections.

_________________
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: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Wed Jun 06, 2018 10:04 am 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
I believe you are talking about the hosts.allow and the snmpd.conf files?

Below are on the Cacti Server, aka the server I'm trying to get to graph on local host.

/etc/hosts.allow
Code:
# AJP - Cacti Testing. Allow snmpd.
#
snmpd: <Working Agent IP>: ALLOW
snmpd: <Local hosts IP>: ALLOW #localhost's ip
snmpd: 127.0.0.1: ALLOW # Loopback, also localhost


/etc/snmp/snmpd.conf
Code:
rocommunity <password>

#Set '<password>' community to the 'readonly'
#       sec.name        source          community
com2sec readonly        <un-used IP>            <password> #atlassian
com2sec readonly        <Local hosts IP>    <password> #localhost's IP
#com2sec readonly       127.0.0.1           <password> #localhost again just encase??
com2sec readonly        <Working Agent IP>   <password> #bridge-up02

#Set 'readonly' to 'AllGroup' for SNMP Version 2c
#       sec.group       sec.model       sec.name
group   AllGroup        v2c             readonly

#Define 'AllView', which includes everything under .1
#       sec.view        incl/excl       MIB.subtree
view    AllView         included        .1
#view    AllView                included        .1.3.6.1.2.1.25.1.1  ##hrSystemUptime - iso(1). org(3). dod(6). internet(1). mgmt(2). mib-2(1). host(25). hrSystem(1). hrSystemUptime(1). 0

#Give 'AllGroup' read access to objects in the view 'AllView'
#                                                       sec.view
#       sec.group       context model   level   prefix  read    write   notify
access  AllGroup        ""      any     noauth  exact   AllView none    none


Top
 Profile  
 
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Mon Jun 11, 2018 6:34 am 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
Another thing to note for anyone reading on, in the /etc/hosts.allow file if you have something like...

snmpd: <Working Agent IP>: ALLOW
snmpd: <Local hosts IP>: ALLOW #localhost's ip

There will be an error thrown on the 2nd line, because of the comment.

This is smarter since it works.
snmpd: <Working Agent IP>: ALLOW
#localhost's ip
snmpd: <Local hosts IP>: ALLOW


Top
 Profile  
 
 Post subject: Re: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Mon Jun 11, 2018 9:41 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1693
that's an interesting bug. Most linux files allow comments at the end of a line to comment it.

_________________
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: Percona Templates and Local Host Issues - RHEL 7.3 Maipo
PostPosted: Mon Jun 11, 2018 10:05 am 
Offline

Joined: Tue May 29, 2018 9:55 am
Posts: 17
Location: Rochester, NY
Yeah I was 100% convinced those lines were fine. However after looking at a log file in /var/log/messages it kept spitting out errors at line whatever, which lined up with that line.

Soon as I dropped that comment to a new line, bingo, worked.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 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