Not correct subject my email about host UP or DOWN
Moderators: Developers, Moderators
Not correct subject my email about host UP or DOWN
Hi all.
When my host falls, I receive a letter about it. In the body of written
that this host is down or a host up. A subject line is always
is the same: "Host Notice: DESK (10.120.6.20) returned from DOWN state"
For example:
The host down, subject line: "Host Notice: DESK (10.120.6.20) returned from
DOWN state "
Host up, subject line: "Host Notice: DESK (10.120.6.20) returned
from DOWN state "
A message body is different, where the proper notification of the UP \ DOWN host
I tried to change the field "Recovering Host Subject" to "Host Notice: <DESCRIPTION> (<HOSTNAME>) is <DOWN/UP> state". But this box is not working variable <DOWN/UP>
What should I do?
When my host falls, I receive a letter about it. In the body of written
that this host is down or a host up. A subject line is always
is the same: "Host Notice: DESK (10.120.6.20) returned from DOWN state"
For example:
The host down, subject line: "Host Notice: DESK (10.120.6.20) returned from
DOWN state "
Host up, subject line: "Host Notice: DESK (10.120.6.20) returned
from DOWN state "
A message body is different, where the proper notification of the UP \ DOWN host
I tried to change the field "Recovering Host Subject" to "Host Notice: <DESCRIPTION> (<HOSTNAME>) is <DOWN/UP> state". But this box is not working variable <DOWN/UP>
What should I do?
Re: Not correct subject my email about host UP or DOWN
I have the same issue.
0.8.7g
PIA 2.9
Settings .7
thold 0.4.3-3 (anything higher doesn't recognize thresholds getting crossed)
Edit retracted.
0.8.7g
PIA 2.9
Settings .7
thold 0.4.3-3 (anything higher doesn't recognize thresholds getting crossed)
Edit retracted.
Last edited by GrahamF on Wed Mar 02, 2011 1:56 pm, edited 2 times in total.
Re: Not correct subject my email about host UP or DOWN
for host subject
you may set different subjects
for down and for up
the only value changed in the subject
and work,it <HOSTNAME> and <DESCRIPTION>
you may set different subjects
for down and for up
the only value changed in the subject
and work,it <HOSTNAME> and <DESCRIPTION>
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
Re: Not correct subject my email about host UP or DOWN
Look.
Topics different but all messages have the same subject "Recovering Host
Subject "-" Recovering Host "
host is DOWN - subject "Recovering Host"
host is UP - subject massege "Recovering Host"
Topics different but all messages have the same subject "Recovering Host
Subject "-" Recovering Host "
host is DOWN - subject "Recovering Host"
host is UP - subject massege "Recovering Host"
- Attachments
-
- qqq.PNG (32.09 KiB) Viewed 4886 times
Re: Not correct subject my email about host UP or DOWN
hello
you have 2 option ,
first make one upgrade of thold , but it necessary PIA 2.9
before make the upgrade first make backup ,because if you have any threshold
when uninstall the plugin , it possible to lase data from told
u make update from http://forums.cacti.net/viewtopic.php?f=17&t=36235
or
modify from directory include under thold plugin
the file polling.php
in function thold_update_host_status
around the line 250 you find this line
and the line between them put this line
also around line 320 u will have again the line mentioned above ,
but this time you should have between this two line
this line
you have 2 option ,
first make one upgrade of thold , but it necessary PIA 2.9
before make the upgrade first make backup ,because if you have any threshold
when uninstall the plugin , it possible to lase data from told
u make update from http://forums.cacti.net/viewtopic.php?f=17&t=36235
or
modify from directory include under thold plugin
the file polling.php
in function thold_update_host_status
around the line 250 you find this line
Code: Select all
$subject = str_replace('<DESCRIPTION>', $host['description'], $subject);
Code: Select all
$subject = strip_tags($subject);
Code: Select all
$subject = str_replace('<DOWN/UP>', 'UP', $subject);
but this time you should have between this two line
this line
Code: Select all
$subject = str_replace('<DOWN/UP>', 'DOWN', $subject);
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
Re: Not correct subject my email about host UP or DOWN
Hi,
I got a strange issue.
Everything is working, but on a host down notification there are always 3 e-mails sent per down host.
On host up, only one e-mail is sent (as it should be)
Any ideas why we always get 3 e-mails on host down notification?
Many tnx
B
I got a strange issue.
Everything is working, but on a host down notification there are always 3 e-mails sent per down host.
On host up, only one e-mail is sent (as it should be)
Any ideas why we always get 3 e-mails on host down notification?
Many tnx
B
Re: Not correct subject my email about host UP or DOWN
there it a little mistake in the code
even host go down u receive the email only whit up
u have 2 option
first it to correct the mistake by your self
in polling.php , or
try to use my one whit few extra option
from hear http://forums.cacti.net/viewtopic.php?f=17&t=36235
but before make update , first a backup because
when uninstall the version that u have , it possible also
to erase your thold configurations
Good luck
even host go down u receive the email only whit up
u have 2 option
first it to correct the mistake by your self
in polling.php , or
try to use my one whit few extra option
from hear http://forums.cacti.net/viewtopic.php?f=17&t=36235
but before make update , first a backup because
when uninstall the version that u have , it possible also
to erase your thold configurations
Good luck
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
Re: Not correct subject my email about host UP or DOWN
dragossto wrote:hello
you have 2 option ,
first make one upgrade of thold , but it necessary PIA 2.9
before make the upgrade first make backup ,because if you have any threshold
when uninstall the plugin , it possible to lase data from told
u make update from http://forums.cacti.net/viewtopic.php?f=17&t=36235
or
modify from directory include under thold plugin
the file polling.php
in function thold_update_host_status
around the line 250 you find this lineand the lineCode: Select all
$subject = str_replace('<DESCRIPTION>', $host['description'], $subject);
between them put this lineCode: Select all
$subject = strip_tags($subject);
also around line 320 u will have again the line mentioned above ,Code: Select all
$subject = str_replace('<DOWN/UP>', 'UP', $subject);
but this time you should have between this two line
this lineCode: Select all
$subject = str_replace('<DOWN/UP>', 'DOWN', $subject);
Thank you for responding to my problem.
Solved it this way:
I changed polling.php as you said, but it did not help me. Then I removed from the WEB interface cacti, messages in threads they were taken from the file polling.php and then I worked.
and after that everything works:)))
And if you want to change the subject of letters, then I correct them in a file polling.php. It's a pity that the Russian subjects can not write, but it's not important
- Attachments
-
- cactiClear.PNG (9.12 KiB) Viewed 4627 times
Re: Not correct subject my email about host UP or DOWN
it good when the job it done
very well , you figure out how to fix your problem
Good luck.
very well , you figure out how to fix your problem
Good luck.
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Not correct subject my email about host UP or DOWN
This post is giving me a headache. I've been away for a while and now I'm totally confused. Going to try to do some additional QA on the pending 0.4.4 based upon this thread.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Not correct subject my email about host UP or DOWN
unfortunately i was in same position and don't have time to make update after svn
after 1 oct , i will have time to update my post after new svn and make test with them.
Have a nice weekend
after 1 oct , i will have time to update my post after new svn and make test with them.
Have a nice weekend
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
Re: Not correct subject my email about host UP or DOWN
To get it to work properly, you need to make an additional change to thold/include/poller.php
Around line 309, change:
to the obvious:
The reason why clearing the web GUI's input field resulted in a correct "DOWN" message was due to the lines immediately following the bug:
Around line 309, change:
Code: Select all
$subject = read_config_option('thold_up_subject');
Code: Select all
$subject = read_config_option('thold_down_subject');
Code: Select all
if ($subject == '') {
$subject = 'Host Error: <DESCRIPTION> (<HOSTNAME>) is DOWN';
}
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Not correct subject my email about host UP or DOWN
cool.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Not correct subject my email about host UP or DOWN
You are obviously not using:millhouse wrote:To get it to work properly, you need to make an additional change to thold/include/poller.php
Around line 309, change:
to the obvious:Code: Select all
$subject = read_config_option('thold_up_subject');
The reason why clearing the web GUI's input field resulted in a correct "DOWN" message was due to the lines immediately following the bug:Code: Select all
$subject = read_config_option('thold_down_subject');
Code: Select all
if ($subject == '') { $subject = 'Host Error: <DESCRIPTION> (<HOSTNAME>) is DOWN'; }
cacti_plugins/thold/branches/stable/
Which does not have this issue.
TheWtiness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Not correct subject my email about host UP or DOWN
yes don't have this issue
but have other problem
around line 344
the line
had to be
i post all the diff between stable from date 25.11.2011 and my modif in this thread
http://forums.cacti.net/viewtopic.php?f=17&t=36235
have a nice day
but have other problem
around line 344
the line
Code: Select all
$subject = str_replace('<DOWN/UP>', 'UP', $subject);
Code: Select all
$subject = str_replace('<DOWN/UP>', 'DOWN', $subject);
http://forums.cacti.net/viewtopic.php?f=17&t=36235
have a nice day
Cacti - 0.8.7h
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
Plugin Architecture - 3.0
Poller Type - SPINE 0.8.7g
Server Info - Linux 2.6.35.10 - Slackware 13.1
Web Server - Apache/2.2.17 (Unix) DAV/2 PHP 5.3.5
MySQL - 5.1.53 ;RRDTool - 1.4.5 ;SNMP - 5.6.1
Plugins
- (tools - v0.3) (Thold - v0.4.6) (Ntop - v0.2) (Discovery - v1.2a) (Monitor - v1.2)
Who is online
Users browsing this forum: No registered users and 2 guests