Xymon Mailing List Archive search

Question on Alert Notifications

11 messages in this thread

list Bill Perez · Fri, 11 Nov 2005 06:55:22 -0500 ·
Hi,
 I was wondering if there was a way to modify the 'hobbit' name of the alert
notifications and also if there was a way to modify the subject of the
alerts in the email notifications.
 Thanks,
Billie
list Thomas Pedersen · Fri, 11 Nov 2005 13:12:36 +0100 ·
The hobbit name is taken from your user entry so if you modify this to your liking this is what will be presented in the mails. For any modification of the e-mail contents its very well explained at the page "Configuring alerts" under the Help menu.

/Thomas
quoted from Bill Perez

Bill Perez wrote:
Hi,
 I was wondering if there was a way to modify the 'hobbit' name of the alert notifications and also if there was a way to modify the subject of the alerts in the email notifications.  Thanks,
Billie
list Bill Perez · Wed, 23 Nov 2005 07:13:00 -0500 ·
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the alert
subject and didn't find any info on that in the Configuring Alerts page.  I
also searched the archives but didn't find anything there either, sorry if
I'm just missing it.  Could someone let me know how to modify the subject of
all alerts and remove the word 'Hobbit' - this is because on our blackberrys
we'll be able to see more of the description of what server is alerting and
recovered.

Thanks much
quoted from Thomas Pedersen


On 11/11/05, Thomas <user-97316fb2dd2a@xymon.invalid> wrote:
The hobbit name is taken from your user entry so if you modify this to
your liking this is what will be presented in the mails. For any
modification of the e-mail contents its very well explained at the page
"Configuring alerts" under the Help menu.

/Thomas

Bill Perez wrote:
Hi,

I was wondering if there was a way to modify the 'hobbit' name of the
alert notifications and also if there was a way to modify the subject
of the alerts in the email notifications.

Thanks,
Billie
list Henrik Størner · Wed, 23 Nov 2005 13:24:06 +0100 ·
quoted from Bill Perez
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the alert
subject and didn't find any info on that in the Configuring Alerts page.
That's because it isn't configurable. You'll have to edit the 
hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the "message_subject"
routine. In there you'll find some code that goes like this:

        switch (alert->state) {
	  case A_PAGING:
	  case A_ACKED:
		subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s [cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But 
if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik
list Bill Perez · Wed, 23 Nov 2005 08:20:38 -0500 ·
Thanks Henrik!

On 11/23/05, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the alert
subject and didn't find any info on that in the Configuring Alerts page.
That's because it isn't configurable. You'll have to edit the
hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the "message_subject"
routine. In there you'll find some code that goes like this:

       switch (alert->state) {
         case A_PAGING:
         case A_ACKED:
               subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s
[cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But
if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik

list Asif Iqbal · Wed, 23 Nov 2005 13:55:35 -0500 ·
OR you could use SCRIPT feature for alert and there you could have
something like this

echo "${BBALPHAMSG}" | mailx -s "[$ACKCODE] $BBHOSTSVC CRITICAL (RED)" $RCPT

This way you are not getting rid of 'Hobbit' word from everywhere and
why would you do that anyway? It actually is easier to filter all the
email with 'Hobbit' and save it on a separate folder. And if you are a
windows user, with Google Desktop, you can later search for all 'Hobbit' alerts
and specific hostname or may be service name in 1 hundredth of a sec.

I know NOTICE type alerts will still have the 'Hobbit' word if you go
this way.

Thanks
quoted from Bill Perez

On Wed, Nov 23, 2005 at 08:20:38AM, Bill Perez wrote:
Thanks Henrik!

On 11/23/05, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the alert
subject and didn't find any info on that in the Configuring Alerts page.
That's because it isn't configurable. You'll have to edit the
hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the "message_subject"
routine. In there you'll find some code that goes like this:

       switch (alert->state) {
         case A_PAGING:
         case A_ACKED:
               subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s
[cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But
if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik

-- 

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the credit...try
 to be in the first group;...less competition there."  - Indira Gandhi
list Bill Perez · Wed, 23 Nov 2005 14:12:47 -0500 ·
Thanks Asif.  The only reason for removing the word Hobbit is that we all
have blackberries and when reading an alert via blackberry, 'Hobbit' takes
up 1/2 of the subject line and it would be more benefical for us to see the
code\server name.  It will also be easier to see on the blackberry which
server has recovered if that server name is first in the subject line.
quoted from Asif Iqbal


On 11/23/05, Asif Iqbal <user-c8222abeff59@xymon.invalid> wrote:
OR you could use SCRIPT feature for alert and there you could have
something like this

echo "${BBALPHAMSG}" | mailx -s "[$ACKCODE] $BBHOSTSVC CRITICAL (RED)"
$RCPT

This way you are not getting rid of 'Hobbit' word from everywhere and
why would you do that anyway? It actually is easier to filter all the
email with 'Hobbit' and save it on a separate folder. And if you are a
windows user, with Google Desktop, you can later search for all 'Hobbit'
alerts
and specific hostname or may be service name in 1 hundredth of a sec.

I know NOTICE type alerts will still have the 'Hobbit' word if you go
this way.

Thanks

On Wed, Nov 23, 2005 at 08:20:38AM, Bill Perez wrote:
Thanks Henrik!

On 11/23/05, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the
alert
subject and didn't find any info on that in the Configuring Alerts
page.
That's because it isn't configurable. You'll have to edit the
hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the
"message_subject"
routine. In there you'll find some code that goes like this:

       switch (alert->state) {
         case A_PAGING:
         case A_ACKED:
               subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s
[cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But
if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the
credit...try
to be in the first group;...less competition there."  - Indira Gandhi

list Asif Iqbal · Wed, 23 Nov 2005 14:31:00 -0500 ·
quoted from Bill Perez
On Wed, Nov 23, 2005 at 02:12:47PM, Bill Perez wrote:
Thanks Asif.  The only reason for removing the word Hobbit is that we all
have blackberries and when reading an alert via blackberry, 'Hobbit' takes
up 1/2 of the subject line and it would be more benefical for us to see the
code\server name.  It will also be easier to see on the blackberry which
server has recovered if that server name is first in the subject line.
Well I am glad you mention blackberry. In that case you rather use
SCRIPT with FORMAT=sms and it will not have any subject at all. Perfect for
blackberry unless you like to delay from blackberry. In that case I
think SCRIPT with FORMAT=plain would be best. So that way users who
receive email will still see ususal alerts with 'Hobbit' and blackberry
users will receive alerts without 'Hobbit'. I am assuming you have a
separate MAIL line for blackberry users.

Thanks
quoted from Asif Iqbal
 
On 11/23/05, Asif Iqbal <user-c8222abeff59@xymon.invalid> wrote:
OR you could use SCRIPT feature for alert and there you could have
something like this

echo "${BBALPHAMSG}" | mailx -s "[$ACKCODE] $BBHOSTSVC CRITICAL (RED)"
$RCPT

This way you are not getting rid of 'Hobbit' word from everywhere and
why would you do that anyway? It actually is easier to filter all the
email with 'Hobbit' and save it on a separate folder. And if you are a
windows user, with Google Desktop, you can later search for all 'Hobbit'
alerts
and specific hostname or may be service name in 1 hundredth of a sec.

I know NOTICE type alerts will still have the 'Hobbit' word if you go
this way.

Thanks

On Wed, Nov 23, 2005 at 08:20:38AM, Bill Perez wrote:
Thanks Henrik!

On 11/23/05, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid> wrote:
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the
alert
subject and didn't find any info on that in the Configuring Alerts
page.
That's because it isn't configurable. You'll have to edit the
hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the
"message_subject"
routine. In there you'll find some code that goes like this:

       switch (alert->state) {
         case A_PAGING:
         case A_ACKED:
               subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s
[cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But
if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik

--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the
credit...try
to be in the first group;...less competition there."  - Indira Gandhi

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the credit...try
 to be in the first group;...less competition there."  - Indira Gandhi
list Takeshi Nishioka · Wed, 30 Nov 2005 13:54:17 +0900 ·
Would you please let us know how to edit Sender entry. It's "Hobbit <user-20f528d1c120@xymon.invalid>" in my environment.


On Wed, 23 Nov 2005 13:24:06 +0100
quoted from Asif Iqbal
user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) wrote:
On Wed, Nov 23, 2005 at 07:13:00AM -0500, Bill Perez wrote:
Thanks Thomas.
I am trying to find out how to take the word 'Hobbit' out of the alert
subject and didn't find any info on that in the Configuring Alerts page.
That's because it isn't configurable. You'll have to edit the hobbit-4.1.2p1/hobbitd/do_alert.c file - look for the "message_subject"
routine. In there you'll find some code that goes like this:

        switch (alert->state) {
	  case A_PAGING:
	  case A_ACKED:
		subjfmt = (include_configid ? "Hobbit [%d] %s:%s %s [cfid:%d]" :  "Hobbit [%d] %s:%s %s");

The "%s" and "%d" are placeholders for the hostname, testname etc. But if you just want to delete the word "Hobbit", you can just delete it.
Run "make", stop Hobbit, run "make install" and start Hobbit after the
change.


Regards,
Henrik

list Henrik Størner · Wed, 30 Nov 2005 07:31:47 +0100 ·
quoted from Takeshi Nishioka
On Wed, Nov 30, 2005 at 01:54:17PM +0900, Takeshi Nishioka wrote:
Would you please let us know how to edit Sender entry. 
It's "Hobbit <user-20f528d1c120@xymon.invalid>" in my environment.
Hobbit just runs your systems "mail" utility to send mail. How
that decides what to put in the From: header is outside Hobbit's
control - typically it picks the "Full name" part of the hobbit
users' entry in the /etc/passwd field, and adds the originating
e-mail address <user-e806796357cf@xymon.invalid>.


Henrik
list Asif Iqbal · Thu, 1 Dec 2005 02:02:46 -0500 ·
quoted from Henrik Størner
On Wed, Nov 30, 2005 at 07:31:47AM, Henrik Stoerner wrote:
On Wed, Nov 30, 2005 at 01:54:17PM +0900, Takeshi Nishioka wrote:
Would you please let us know how to edit Sender entry. > It's "Hobbit <user-20f528d1c120@xymon.invalid>" in my environment.
If you use `mailx' you could use `-r' hook for sender's address.
quoted from Henrik Størner
Hobbit just runs your systems "mail" utility to send mail. How
that decides what to put in the From: header is outside Hobbit's
control - typically it picks the "Full name" part of the hobbit
users' entry in the /etc/passwd field, and adds the originating
e-mail address <user-e806796357cf@xymon.invalid>.


Henrik

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the credit...try
 to be in the first group;...less competition there."  - Indira Gandhi