Gaps in Graphs - Script Method

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

Moderators: Developers, Moderators

Post Reply
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Gaps in Graphs - Script Method

Post by pradeepspa »

Hello Folks,

I am monitoring the throughput of the device using custom bash script. My script will ssh into that device and get the stats. The issue is , its graphing but having lots of gaps in between.
cacti-graphs.JPG
cacti-graphs.JPG (38.28 KiB) Viewed 870 times
When I run the script manually , the total time it takes is between 3-6seconds. I have increased the poller for script from 25 to 50 seconds. At this point , I am not sure what causes this gap. Could someone help me out please?
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Re: Gaps in Graphs - Script Method

Post by pradeepspa »

Any one to help me in this ?
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Re: Gaps in Graphs - Script Method

Post by sjs »

I would guess that the script still runs into timeouts, despite your increase of the maximum execution time of the poller script.
Have you checked the cacti log? (If necessary, after increasing the log level.)

Regards
sjs
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Re: Gaps in Graphs - Script Method

Post by pradeepspa »

Thanks for responding. I dont see any error in the logs (already in debug mode)
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Re: Gaps in Graphs - Script Method

Post by pradeepspa »

Any tweak would fix this?
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Re: Gaps in Graphs - Script Method

Post by sjs »

With log level set to "MEDIUM" or higher, the return value of every data polling task is logged. Have you checked that your script returns reasonable values during the periods in which no data is graphed?

Another idea: have you checked in the Console in "Devices" that the device in question has been in the "up" state for a reasonable time? (I.e.: much longer than the time period from the last gap in your graph.)


Regards

sjs
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Re: Gaps in Graphs - Script Method

Post by pradeepspa »

I have increased the logging to "HIGH". where can I see the return value logged? from "/var/log/messages" or "usr/share/cacti/cacti.log"
sjs
Posts: 22
Joined: Wed Oct 24, 2007 1:22 pm

Re: Gaps in Graphs - Script Method

Post by sjs »

pradeepspa wrote:I have increased the logging to "HIGH". where can I see the return value logged? from "/var/log/messages" or "usr/share/cacti/cacti.log"
It's should be in cacti.log, at least it's in /var/log/cacti/cacti.log on my system. Anyway, the log entries can also be found via the cacti Web GUI. (Console -> Utilities -> View Cacti Log File)

Here are some examples from my own system:

Code: Select all

10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[3] SCRIPT: perl /usr/share/cacti/site/scripts/linux_memory.pl MemFree:, output: 350848
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[4] SCRIPT: perl /usr/share/cacti/site/scripts/linux_memory.pl SwapFree:, output: 19683612
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[5] SCRIPT: perl /usr/share/cacti/site/scripts/loadavg_multi.pl, output: 1min:0.02 5min:0.01 10min:0.00
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[6] SCRIPT: perl /usr/share/cacti/site/scripts/unix_users.pl , output: 0
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[7] SCRIPT: perl /usr/share/cacti/site/scripts/unix_processes.pl, output: 230
[...]
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[17] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.3, value: 2494340127
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[17] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.3, value: 1738136686
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[25] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.4, value: 682601387
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[25] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.4, value: 3873535815
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[26] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, value: 2938484972
10/02/2017 03:15:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[26] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, value: 3109859565
Regards
sjs
pradeepspa
Cacti User
Posts: 67
Joined: Wed Nov 25, 2015 2:35 pm

Re: Gaps in Graphs - Script Method

Post by pradeepspa »

Its blank when I search through the "host ip"

However from cli I see this below.
10/01/2017 10:20:53 PM - SPINE: Poller[0] Host[7141] TH[1] DS[118199] SCRIPT: /bin/bash /usr/share/cacti/scripts/Toughswitch-Port2.sh ip, output: Port2TxByte:207897263249 Port2RxByte:1225712052837
10/02/2017 12:25:55 AM - SPINE: Poller[0] Host[7142] TH[1] DS[118239] SCRIPT: /bin/bash /usr/share/cacti/scripts/Toughswitch-Port3.sh ip, output: Port3TxByte:0 Port3RxByte:0
10/02/2017 03:20:57 AM - SPINE: Poller[0] Host[7145] TH[1] DS[118204] SCRIPT: /bin/bash /usr/share/cacti/scripts/Toughswitch-Port2.sh ip, output: Port2TxByte:1419165352328 Port2RxByte:74620181340
as per timestamp they aren't recent ones.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests