[Solved]Unable to graph SNMP data of EC2 instance on AWS

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
khalilmeb
Posts: 12
Joined: Thu Jun 20, 2019 9:20 am

[Solved]Unable to graph SNMP data of EC2 instance on AWS

Post by khalilmeb »

Hello,

I'm using Cacti powered by Symetricore in AWS marketplace. Cacti is deployed in EC2 instance on AWS.

I have added my Cisco Routers CSR1000v which are deployed on AWS as well to Cacti server. The Cacti server could retrieve the SNMP information from the routers. After that, I added the interfaces that I'd like to have their graphs. However, after more than an hour I could not see anything in the graphs. Even though I have traffic going through my network nodes.

Please, find attached the graph debug mode of one of my routers and SNMP information.


Here is the

Code: Select all

cat /var/log/cacti/cacti.log
[/size]

Code: Select all

06/20/2019 15:15:01 - POLLER: Poller[1] ASSERT: '1200732<0:3:25:05.17' failed. Recaching host '172.0.1.8', data query #2
06/20/2019 15:15:01 - POLLER: Poller[1] ASSERT: '1200908<0:3:25:06.88' failed. Recaching host '172.1.1.13', data query #2
06/20/2019 15:15:01 - POLLER: Poller[1] ASSERT: '1200782<0:3:25:05.60' failed. Recaching host '52.38.167.137', data query #2
06/20/2019 15:15:01 - POLLER: Poller[1] ASSERT: '1200553<0:3:25:03.27' failed. Recaching host '172.3.1.12', data query #2
06/20/2019 15:15:02 - SYSTEM STATS: Time:1.2240 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:24 RRDsProcessed:12
06/20/2019 15:15:02 - PCOMMAND Device[1] WARNING: Recache Event Detected for Device
06/20/2019 15:15:03 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541
06/20/2019 15:15:03 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_commands.php: 112 run_data_query)(/lib/data_query.php: 154 update_poller_cache_from_query)(/lib/utility.php: 103 poller_update_poller_cache_from_buffer)(/lib/utility.php: 541 sizeof)(CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
06/20/2019 15:15:03 - PCOMMAND Device[2] WARNING: Recache Event Detected for Device
06/20/2019 15:15:03 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541
06/20/2019 15:15:03 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_commands.php: 112 run_data_query)(/lib/data_query.php: 154 update_poller_cache_from_query)(/lib/utility.php: 103 poller_update_poller_cache_from_buffer)(/lib/utility.php: 541 sizeof)(CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
06/20/2019 15:15:03 - PCOMMAND Device[3] WARNING: Recache Event Detected for Device
06/20/2019 15:15:03 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541
06/20/2019 15:15:03 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_commands.php: 112 run_data_query)(/lib/data_query.php: 154 update_poller_cache_from_query)(/lib/utility.php: 103 poller_update_poller_cache_from_buffer)(/lib/utility.php: 541 sizeof)(CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
06/20/2019 15:15:03 - PCOMMAND Device[4] WARNING: Recache Event Detected for Device
06/20/2019 15:15:03 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541
06/20/2019 15:15:03 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_commands.php: 112 run_data_query)(/lib/data_query.php: 154 update_poller_cache_from_query)(/lib/utility.php: 103 poller_update_poller_cache_from_buffer)(/lib/utility.php: 541 sizeof)(CactiErrorHandler)(/lib/functions.php: 4585 cacti_debug_backtrace)
06/20/2019 15:15:03 - RECACHE STATS: Poller: RecacheTime:0.3179 DevicesRecached:4
06/20/2019 15:15:42 - ERROR PHP NOTICE: Undefined index: host_template_id in file: /usr/share/cacti/site/graphs_new.php  on line: 1035
06/20/2019 15:15:42 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 63 graphs)(/graphs_new.php: 1035 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
06/20/2019 15:16:54 - ERROR PHP NOTICE: Undefined index: host_template_id in file: /usr/share/cacti/site/graphs_new.php  on line: 1035
06/20/2019 15:16:54 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 63 graphs)(/graphs_new.php: 1035 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)

Has anybody faced such an issue? I would very thankful to have your feedback.

Thank you!
Attachments
Screenshot 2019-06-20 at 4.49.01 pm.png
Screenshot 2019-06-20 at 4.49.01 pm.png (20.75 KiB) Viewed 1299 times
Screenshot 2019-06-20 at 4.35.36 pm.png
Screenshot 2019-06-20 at 4.35.36 pm.png (130.63 KiB) Viewed 1300 times
Last edited by khalilmeb on Thu Jun 20, 2019 11:25 am, edited 4 times in total.
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Unable to graph SNMP data of EC2 instances using Cacti A

Post by camerabob »

Please ensure you have polling enabled in the cron. No cron task=no graphs.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
khalilmeb
Posts: 12
Joined: Thu Jun 20, 2019 9:20 am

Re: Unable to graph SNMP data of EC2 instances using Cacti A

Post by khalilmeb »

camerabob wrote:Please ensure you have polling enabled in the cron. No cron task=no graphs.
I'm sorry, how can I check that?
Well, if you mean changing Poller Type from cmd.php to spine, I did. Here's the log

Code: Select all

2019/06/20 15:35:01 - POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '60' seconds, with a maximum of a '60' second Cron, but 301.0 seconds have passed since the last poll!
2019/06/20 15:35:03 - SYSTEM STATS: Time:1.2455 Method:spine Processes:1 Threads:1 Hosts:5 HostsPerProcess:5 DataSources:6 RRDsProcessed:3
2019/06/20 15:40:01 - POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '60' seconds, with a maximum of a '60' second Cron, but 300.4 seconds have passed since the last poll!
2019/06/20 15:40:02 - SYSTEM STATS: Time:1.2254 Method:spine Processes:1 Threads:1 Hosts:5 HostsPerProcess:5 DataSources:4 RRDsProcessed:2
2019/06/20 15:40:53 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541
khalilmeb
Posts: 12
Joined: Thu Jun 20, 2019 9:20 am

Re: Unable to graph SNMP data of EC2 instances using Cacti A

Post by khalilmeb »

khalilmeb wrote:
camerabob wrote:Please ensure you have polling enabled in the cron. No cron task=no graphs.
I'm sorry, how can I check that?
Well, if you mean changing Poller Type from cmd.php to spine, I did. Here's the log

Code: Select all

2019/06/20 15:35:01 - POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '60' seconds, with a maximum of a '60' second Cron, but 301.0 seconds have passed since the last poll!
2019/06/20 15:35:03 - SYSTEM STATS: Time:1.2455 Method:spine Processes:1 Threads:1 Hosts:5 HostsPerProcess:5 DataSources:6 RRDsProcessed:3
2019/06/20 15:40:01 - POLLER: Poller[1] WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '60' seconds, with a maximum of a '60' second Cron, but 300.4 seconds have passed since the last poll!
2019/06/20 15:40:02 - SYSTEM STATS: Time:1.2254 Method:spine Processes:1 Threads:1 Hosts:5 HostsPerProcess:5 DataSources:4 RRDsProcessed:2
2019/06/20 15:40:53 - ERROR PHP WARNING: sizeof(): Parameter must be an array or an object that implements Countable in file: /usr/share/cacti/site/lib/utility.php  on line: 541

It's working now!
Obviously, I had to change Poller Interval and Cron Interval time.

Many thanks :)
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: [Solved]Unable to graph SNMP data of EC2 instance on AWS

Post by camerabob »

From your log, you do have polling enabled. It appears the cron interval is set to 300 seconds, but the data profile selected is set for 60 seconds. The cron is in /etc/cron.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: [Solved]Unable to graph SNMP data of EC2 instance on AWS

Post by netniV »

As long as the cron interval is defined as the same length of time between each call to poller.php that shouldn't be an issue.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest