Email Alert for Specific host

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

Moderators: Developers, Moderators

Post Reply
sonic7
Posts: 17
Joined: Thu Jun 11, 2015 5:49 am

Email Alert for Specific host

Post by sonic7 »

I want alert of host up & host down only for my Servers. In my Cacti I added both user & server graph.
I install Setting plugin & also Threshold aka Thold plugin. Setup SELinux to allow emails using this command.
setsebool -P httpd_can_sendmail=1

Host alerts emails are sending successfully. Now I want only specific server graphs like a particular graph tree, not all users graphs.
Can I do it. Please tell me.
sonic7
Posts: 17
Joined: Thu Jun 11, 2015 5:49 am

Re: Email Alert for Specific host

Post by sonic7 »

Thank God. I finally find a way to disable user's host alert. Now only server's alert are coming.

But all alerts generated after 5 min intervals like 1:00 1:05 1:10 1:15 etc.
During these intervals i can't received alert. If a machine goes down at 1:02 minute, cacti notify me at 1:05.

Can I reduce alert timing to 10 second or minimum 30 second ?
Attachments
Thold.png
Thold.png (133.87 KiB) Viewed 1514 times
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Email Alert for Specific host

Post by phalek »

The host-down checks are done during the polling cycle, as is the alerting. You probably have a 5 minute polling interval, hence you're alerted at 00:00, 00:05, 00:10 ...

You may change the polling interval to 1 minute, but then you have to take care of a lot of other things as well.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sonic7
Posts: 17
Joined: Thu Jun 11, 2015 5:49 am

Re: Email Alert for Specific host

Post by sonic7 »

phalek wrote:The host-down checks are done during the polling cycle, as is the alerting. You probably have a 5 minute polling interval, hence you're alerted at 00:00, 00:05, 00:10 ...

You may change the polling interval to 1 minute, but then you have to take care of a lot of other things as well.
Thanks for the reply.
I know i have to change some things too.
check diff poller values
set poller interval = 30 sec & then 1 min & cron interval = 1 min.

Edit cron file & set to 1 min.
vi /etc/cron.d/cacti
*/1 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Rebuild poller cache. But still graph generated after 5 min & alerts come after 5 mins.

I also check following URL. According to him after changes default settings we need to recreate or remove old rrd files.
http://dikehtonon.blogspot.com/2011/11/ ... spine.html

Can i continue old rrd with new settings of poller & cron ?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Email Alert for Specific host

Post by phalek »

you will also have to :

- Create a new set of RRAs for the 1 minute polling
- Create a new data template which uses these new RRAs
- Create a graph template using the data template which contains the new RRAs.

Then you can add the new graph template to your device, so it's being polled every minute. Otherwise it will still be polled every 5 minutes.

You do not need to delete the existing rrds unless you want to switch all graphs to 1-minute polling, which requires a different approach ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sonic7
Posts: 17
Joined: Thu Jun 11, 2015 5:49 am

Re: Email Alert for Specific host

Post by sonic7 »

phalek wrote:you will also have to :

- Create a new set of RRAs for the 1 minute polling
- Create a new data template which uses these new RRAs
- Create a graph template using the data template which contains the new RRAs.

Then you can add the new graph template to your device, so it's being polled every minute. Otherwise it will still be polled every 5 minutes.

You do not need to delete the existing rrds unless you want to switch all graphs to 1-minute polling, which requires a different approach ...

Thanks for response.
New graph generated quickly before 5 min intervals.
How can I switch old 5 minute polling graph to 1 minute polling graph? I know it will very difficult task & lots of headache. May be i will not try it. But I just need to know for knowledge.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Email Alert for Specific host

Post by phalek »

Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sonic7
Posts: 17
Joined: Thu Jun 11, 2015 5:49 am

Re: Email Alert for Specific host

Post by sonic7 »


Thanks :wink:
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests