Subject: Notifications - How to extract hostname/ip adress

From: "Frithiof Jensen (AH/LMD)" <[email-masked]>
Date: Tue, 6 Sep 2005 10:38:03 +0200

Hi List,

I need to extract notifications from Argus and insert them into an SQL database. I would like to use the hostname field as a key to associating alarms with specific hosts, so I need to extract it. 

This seems to be doable, the notification documentation says:

"""
The %O{param} - the current value of the specified object parameter (3.3)  
"""
but does not specify what "object parameter" is exactly ("hostname" will not work).

Anyone tried this?

mvh,
Frithiof Jensen B.Sc. E.E.
System Developer
Ericsson Telebit A/S
+45 4072 6554
[email-masked]

---

From: Jeremy Kister <[email-masked]>
Date: Tue, 06 Sep 2005 15:36:19 -0400

> but does not specify what "object parameter" is exactly ("hostname" will not work).

I've implemented an Argus notification SQL log, but had to turn it off.

All I did was make a new method in the config, and sent notifications to it.

Method "sql" {
   command: /export/scripts/sqlnotify.pl %R
   send:    %T - %O - %A
   qtime:      0
   nolotsmsgs: yes
}

Since the script would connect to the db on each run (it wasnt
daemonized), I found that when argus had one too many notifications, all
my perl brought the machine down to it's knees, and I havent put forth
any effort to redesign it.

-- 

Jeremy Kister
http://jeremy.kister.net./

---

From: "Jason 'XenoPhage' Frisvold" <[email-masked]>
Date: Tue, 06 Sep 2005 22:31:22 -0400

>any effort to redesign it.

One possible re-design would be to write a perl "daemon" that does a
constant tail on a file.  Write the notification to the file and the
"daemon" should handle the rest.  No perl startup needed.

Just a thought.  :)

-- 
---------------------------
Jason 'XenoPhage' Frisvold
Engine / Technology Programmer
[email-masked]
RedHat Certified - RHCE # 803004140609871
MySQL Pro Certified - ID# 207171862
MySQL Core Certified - ID# 205982910
---------------------------
"Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming."