- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Want SHORT email format for Event Monitor Software...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2003 06:05 AM
тАО09-23-2003 06:05 AM
Unfortunately the email is now sent to my cell phone. The cell phone busts it up into 7 separate pages, and sends them in scrabbled order.
I got 28 pages last night. All I could tell was I needed to log in. It was faster to log in, than to unscramble the pages.
So here's my question: Is there a way to send a SMALLER format message? Then I would get one page per error.
I see /etc/opt/resmon/lbin/monconfig has an email option, but I don't see a email FORMAT option.
I am using hpux11.0
steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2003 02:19 PM
тАО09-23-2003 02:19 PM
Re: Want SHORT email format for Event Monitor Software Messages.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2003 04:23 PM
тАО09-23-2003 04:23 PM
Re: Want SHORT email format for Event Monitor Software Messages.
However, you can change the notification type to TCP target and can make the tcp client to send you a mail whenever it receives a notification. For instance, the tcp_target file that comes along with the EMS Devkit is a simple C file that receives the notification, decode it to soem extent and prints the same to the screen. The same can be changed to send a mail of needed format to you.
The other option is the writing to the syslog or textlog and monitoring it by our own shell scripts and making it a part of cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2003 12:23 AM
тАО09-24-2003 12:23 AM
Re: Want SHORT email format for Event Monitor Software Messages.
I'll have to read up on sendmail before I can use alias.
I would not know what port to send the message to for a tcp message.
I don't know the format of the message as it hits the syslog.
But at least I can start there.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2003 09:19 AM
тАО09-24-2003 09:19 AM
Solution1. send EMS messages to syslog.log and create a syslog script that watches for new messages, extracts the useful info and sends the shortened message to your cellphone via mailx.
2. create a mail processing script using /etc/mail/aliases and send the shortened messages to your cellphone. The procmail package can perform this task but is probably overkill for this task.
For choice #2, you don't need to read the several hundred pages on sendmail, the man page for aliases describes the basics. Here is the technique:
/etc/mail/aliases can be used to redirect email to other addresses. For example:
root : billh@mycpu.domain.com
postmaster : root
webmaster : root
So now all messages to root will be sent to billh@... and messages sent to postmaster or webmaster will also go to root which in turn is redirected to billh@...
Now for email processing, you can simply alias the address (which doesn't have to be a login on the system) to a pipe and script as in:
emsnotify : | "/usr/local/bin/emsformat"
In this case, the entire email message will be sent (via stdin) to the script emsformat. The script must be runnable by the daemon user, and that daemon can create/access any file(s) needed by the script. The script will see all of the mail headers first followed by a single blank line. The format for the EMS message is the same for each notification. To setup the email filter:
1. Create a script called /usr/local/bin/emsfilter. To make things easier, just put something simple in it such as:
#!/usr/bin/sh
PATH=/usr/bin
cat > /tmp/ems.test.log
QWIKMSG=$(head -3 /tmp/ems.test.log)
logger "$0 $QWIKMSG"
2. Store this script with owner daemon:bin and 755 permission. Test that it works OK by using su - daemon and run the script with something like:
cat /etc/issue | /usr/local/bin/emsfilter.
You should see /etc/issue copied into the file /tmp/ems.test.log and in syslog.log, you'll see a message. Once this is working, replace the test code with the formatting code, then configure EMS to send all messages to the email address: emsnotify
In case things don't work, start with the file /var/adm/syslog/mail.log. You'll typically see a couple of errors: error 127 usually means that the daemon user could not run the script (permissions for the file and also for the parent directories), or error 2 which usually means the script itself is having a problem running as the daemon user (errno 2 means no such file). By running the script as the daemon user via su - daemon, you should see any errors reported.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2003 12:13 AM
тАО09-25-2003 12:13 AM
Re: Want SHORT email format for Event Monitor Software Messages.
Steve