[bdNOG] FW: CACTI Graph Issue

Aniruddha Barua aniruddha.barua at colbd.com
Mon Dec 14 11:05:23 BDT 2015


Dear Mr. Shahjahan,

I did not give you those advices, those were given by Mr. Anurag, Mr. Zehad and others.

Many people forget to restart/reload "crond" process after changing /etc/crontab and other files in /etc/cron.d directory. Remember that files in /etc/cron.d are NOT executable scripts, those are "crontab" files, i.e. application specific schedulers (e.g. /etc/cron.d/cacti for "cacti" application) like the master /etc/crontab file. Files in /etc/cron.{hourly,daily,weekly,monthly} are executable scripts/programs (better to avoid binary executables here, just put shell scripts that call the actual binary executables). You do not need to restart/reload "crond" after adding new files or editing any existing file in /etc/cron.{hourly,daily,weekly,monthly} directories. Also, never put any crontab file in these directories. To edit user specific crontab files (saying again - crontab files, NOT shell scripts/binaries), look into /var/spool/cron/ directory for files by the usernames (e.g. /var/spool/cron/apache).

Best regards,

ANIRUDDHA BARUA 
Email: aniruddha.barua at colbd.com, cto at colbd.com

---------- Original Message -----------
From: Mohammad Shahjahan <bunty.ctg at hotmail.com> 
To: Anurag Bhatia <me at anuragbhatia.com>, "aniruddha.barua at colbd.com" <aniruddha.barua at colbd.com> 
Cc: "nog at bdnog.org" <nog at bdnog.org> 
Sent: Sun, 13 Dec 2015 09:33:39 +0600 
Subject: RE: [bdNOG] FW: CACTI Graph Issue

> Dear Sir,
> @Aniruddha Sir, you are right actually we need to wait for until graph data has been generate from 'host' then cacti will show that and after you told me to check cron job, i have just restart the crond service then after morning i have got the graph as in attachment.
> 
> @Anuragbhatia, you are also right about it. You have really nice domain (anuragbhatia.com) and you have shared lots of technical help thank you for all of your knowledge. I am also trying to share my knowledge through my own domain blog (blog.magpiebd.net).
> 
> Through this NMG(Network Monitoring Graph) conversation i have heard about three graph tools (cacti, LibreNMS, Observium). I just fan of 1st cacti and 2nd LibreNMS. Ovservium is so heavy.
> 
> Thank you all. I am really really appreciate your help
> 
> Thank you again.
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 18:37:18 +0530
> Subject: Re: [bdNOG] FW: CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org; aniruddha.barua at colbd.com
> 
> Hi Mohammad
> 
> While everyone suggests for other NMS operations (which is great for all of us to know! :) ) - I can try to help you find why graphing is failing in Cacti.
> 
> @Mr Kabir - LibreNMS Interesting. Heard for first time. Thanks for sharing. 
> 
> @Mohanmmad, from data you have shared so far: 
> 
>
* SNMP is working is configured well. Server on which cacti is running is able to do SNMP queries successfully. 
* Cron job does seems configured, although I am unsure if it's really running or not. 
* Graphs are generated correctly. 

> 
> Let's try on cronjob part. You mentioned CentOS, so please verify crond is installed. If not then please do sudo yum update && sudo yum install crond
> 
> 
> Once installed try: sudo service crond start. 
> 
> If you find crond is installed and running, then please try executing what cron is executing manually. 
> 
> Become cacti user using: 
> 
> su cacti 
> 
> next, execute poller script: 
> 
>  /usr/bin/php /usr/share/cacti/poller.php
> 
> See if it gives any error. 
> 
> Good luck! 
> 
> On Sat, Dec 12, 2015 at 3:58 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> Dear Sir,
> 
> What you have told to all set and eve though getting snmp replay data in server but same situation.
> 
> 
> CISCO Configuration:
> 
> snmp-server community public RW
> snmp-server location YOUNGONECTG
> snmp-server contact sysadmin at youngonectg.com
> 
> Observium is free but i don't it's support fully opensource but it beautiful if it's PAID.
> 
> Thank you so much.
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 15:08:20 +0530
> Subject: Re: [bdNOG] CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org
> 
> Dear Mohammad
> 
> You may checkout Console > Devices > (Select device which you are graphing) > SNMP - Interface Statistics on bottom under "Associated Data Queries" > Click on  (Verbose Query) in front of it
> 
> and see what output you get from the raw query. Verify that SNMP community is correct and the server on which cacti is running is able to grab SNMP data from other end device. 
> 
> You can also try running: 
> 
> snmpwalk -v2c -c community-name  IP-ADDRESS-of-device 
> 
> and see if device replies with SNMP data. 
> 
> @Paul & Anamul - Yeah Observium is cool. I loved the auto-discover feature in it and UI is cool but I personally found tweaking very hard. I guess with graphing as well as monitoring tools it's more like what one has (successfully) used in past and we get in favor of it. I would love to learn how to tweak Observium. :) 
> 
> Thanks. 
> 
> On Sat, Dec 12, 2015 at 2:53 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> Dear Sir,
> 
> After ONE HOUR the issue is remain same.
> 
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 12:49:06 +0530
> 
> Subject: Re: [bdNOG] CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org
> 
> You can wait for 20-25mins and see if actual graph is visible. 5min cron means it would be drawing every 5 mins and thus initial 10-15mins might not have a visible clear graph.
> 
> So try checking again after 20mins or so. 
> 
> On Sat, Dec 12, 2015 at 12:36 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> Dear Sir,
> 
> i have removed '#' and restart crond service. the problem is remain same.
> 
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 12:28:42 +0530
> 
> Subject: Re: [bdNOG] CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org
> 
> Hi
> 
> If you have what you exactly posted then it seems  like a disabled cron :) 
> 
> Remove hash (#) before */5..... and then it will actually run. It seems commented (disabled) as of now. 
> 
> On Sat, Dec 12, 2015 at 12:27 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> Dear Sir,
> 
> Yes it just showing zero data but GUI graph is showing.
> I have configured cronjob as below
> 
> # vi /etc/cron.d/cacti
> #*/5 * * * *   cacti   /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
> 
> 
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 12:22:56 +0530
> 
> Subject: Re: [bdNOG] CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org
> 
> This means it is OK and able to fetch data. 
> 
> What exactly you see in graphs - just blank graphs? If so, please ensure that you have cronjob configured to do polling every 5mins or so. 
> 
> On Sat, Dec 12, 2015 at 12:17 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> 
> Dear Sir,
> 
> For specific interface i have got the following log:
> 
> RRDTool Command:
>
/bin/rrdtool graph - 
\
--imgformat=PNG 
\
--start='-86400' 
\
--end='-300' 
\
--title='SHAHJAHAN-DESK - Traffic - Po1' 
\
--rigid 
\
--base='1000' 
\
--height='120' 
\
--width='500' 
\
--alt-autoscale-max 
\
--lower-limit='0' 
\
--vertical-label='bits per second' 
\
--slope-mode 
\
--font TITLE:10: 
\
--font AXIS:7: 
\
--font LEGEND:8: 
\
--font UNIT:7: 
\
DEF:a='/usr/share/cacti/rra/shahjahan-desk_traffic_in_27.rrd':'traffic_in':AVERAGE 
\
DEF:b='/usr/share/cacti/rra/shahjahan-desk_traffic_in_27.rrd':'traffic_out':AVERAGE 
\
CDEF:cdefa='a,8,*' 
\
CDEF:cdefe='b,8,*' 
\
AREA:cdefa#00CF00FF:'Inbound' 
\
GPRINT:cdefa:LAST:' Current\:%8.2lf %s' 
\
GPRINT:cdefa:AVERAGE:'Average\:%8.2lf %s' 
\
GPRINT:cdefa:MAX:'Maximum\:%8.2lf %s\n' 
\
LINE1:cdefe#002A97FF:'Outbound' 
\
GPRINT:cdefe:LAST:'Current\:%8.2lf %s' 
\
GPRINT:cdefe:AVERAGE:'Average\:%8.2lf %s' 
\
GPRINT:cdefe:MAX:'Maximum\:%8.2lf %s\n' 
RRDTool Says:
>OK

> 
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> 
> 
> 
> 
-----------------------------------------------------------------------
From: me at anuragbhatia.com
> Date: Sat, 12 Dec 2015 12:14:01 +0530
> Subject: Re: [bdNOG] CACTI Graph Issue
> To: bunty.ctg at hotmail.com
> CC: nog at bdnog.org
> 
> Dear Mohammad
> 
> You can try opening Console > Graph Management > select any graph which is failing. 
> 
> Next, click on "debug graph" on top right and that should give you basic idea on why it's failing. 
> 
> On Sat, Dec 12, 2015 at 12:09 PM, Mohammad Shahjahan <bunty.ctg at hotmail.com> wrote:
> 
> 
> Dear Brother,
> 
> I have configured cacti server in CentOS 7 without any error. But i am not able to see any graph result.
> 
> I need your help.
> 
> Thank you so much in advanced.
> --------------------------------------------------------
> Engr. Mohammad Shahjahan
> Member of Institute of Engineer Bangladesh
> Membership Number: M/31195
> Chittagong, Bangladesh
> Contact Information: +8801752789798
> --------------------------------------------------------
> 
> _______________________________________________
> nog mailing list
> nog at bdnog.org
> http://mailman.bdnog.org/mailman/listinfo/nog
> 
> 
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
> _______________________________________________
> nog mailing list
> nog at bdnog.org
> http://mailman.bdnog.org/mailman/listinfo/nog
> 
> 
> 
> 
> -- 
> 
> 
> 
> 
> Anurag Bhatia
> 
> 
> anuragbhatia.com
> 
> 
> 
> PGP Key Fingerprint: 3115 677D 2E94 B696 651B 870C C06D D524 245E 58E2
------- End of Original Message -------
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bdnog.org/pipermail/nog/attachments/20151214/1d8e933e/attachment-0001.html>


More information about the nog mailing list