Server Management - Systems Insight Manager
1833738 Members
2701 Online
110063 Solutions
New Discussion

Re: How to send alarm to text file

 
Chris Andersen
New Member

How to send alarm to text file

Hi,

How can i send an alarm from SIM to a text file.

I would like to create a event / task that starts a custom command that creates a text file with this info: Systemname, eventtime and serity.

Can anyone help me??
Thanks in advance
3 REPLIES 3
Rob Buxton
Honored Contributor

Re: How to send alarm to text file

You'll need to develop some scripting skills.

I use perl, but anything will do.

You can generate events by using the HP Management Agents GUI to send Test SNMP Traps which generate Events.

The Help Guide for HPSIM has a section on the variables HPSIM will send through to a Custom command.
See:
http://h18004.www1.hp.com/products/servers/management/hpsim/infolibrary.html

Chris Andersen
New Member

Re: How to send alarm to text file

Hi,

Do you have any nice example script, which put for ex. noticelable, devicename and noticeseveretystr in a text file.

Thanks
Rob Buxton
Honored Contributor

Re: How to send alarm to text file

The following perl script would open the file texfile.tmp and write the contents of the variable $NOTICEPLAINTEXT to that file.

use Env;

open MAILTMP, '>textfile.tmp';
print MAILTMP "$NOTICEPLAINTEXT";
close MAILTMP;

exit;

You would need to have perl installed on the CMS.