Pager Alert


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Pager Alert
# 1  
Old 03-08-2011
Pager Alert

I want to check the log file continoulsy and to send a page alert if i see specific message like Reached Max Connrctions . Please suggest how to do this through script
DO i need to enable the cronjob to run the script evey 5 min or what is the best way
# 2  
Old 03-08-2011
See man tail, -f option, much slicker way in than a timed poll, low latency, too. You can use grep to find the line number of the last hit, and tail after that line, if you want to restart it seamlessly after a hit. Maybe something like this, to continue after each hit:
Code:
 
while tail -f +0$last_hit_line $log_file | grep -q 'your_patern'
do
 tail -f +0$last_hit_line $log_file | grep -n 'your_patern' | tail -1 | read last_hit_line x
 .
 .
 .
done

# 3  
Old 03-08-2011
hi i need to monitor the log file and need to perform the series of steps as soon as i see some text .the below code is just greeping data .
# 4  
Old 03-09-2011
the rest gap is for self-study.
# 5  
Old 03-14-2011
Well, methods vary. Do whatever in the loop. I like:
Code:
echo "Identifying message" | mailx -s "$(uname -n):Subject-topic" pager_email_address

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

**ALERT**ALERT* Whats app requesting users to upgrade to latest version as; its vulnerability found.

Hello All, Want to share here an article for Whats app users that team whats app is requesting users to upgrade to its latest version since they have found a vulnerability; where Hacker could turn on a cell's camera, mic and scan messages and emails. Here is an article from "THE VERGE" for... (1 Reply)
Discussion started by: RavinderSingh13
1 Replies

2. Shell Programming and Scripting

All output to terminal pager by default

How can I have all my output to a terminal pager by default. I want all output to pause once screen is full. Piping to more does not work if the app/script is interactive (2 Replies)
Discussion started by: aydj
2 Replies

3. Shell Programming and Scripting

Adding Pager notification to mailx command.

Is it possible to add Pager Notification to mailx command?? :confused: Or by any other mean. ---------- Post updated at 08:49 AM ---------- Previous update was at 07:08 AM ---------- Hi just want to specify that by Pager i mean a message to the mobile number. Suppose i have following... (1 Reply)
Discussion started by: Sharma331
1 Replies

4. UNIX for Dummies Questions & Answers

Alert to be triggered

Hi, I need an alert to be triggered if any filesystem(imagine there are n no of filesystems) reaches more than 90%, it should send an alert to the mailbox stating which filesystem is at what percentage. How can I achieve this in unix? Many thanks. (8 Replies)
Discussion started by: venkatesht
8 Replies

5. Shell Programming and Scripting

File alert

Hi friends I have configuration files in one directory. I want to get an alert if any of the existing files gets modified or any new configuration file is present in the directory. Please help me to design a script for this task. Thanks in advance. John (2 Replies)
Discussion started by: johnl
2 Replies

6. AIX

mail, aliases, pager

Hi, I have two aliases for two types of alert. /etc/aliases italert1: user1@company.com italertb: 123456@paging.isp.com The first alias containts only an email to go through the company exchange/mail server. Works fine. The second alias contains only a pager which also works fine.... (2 Replies)
Discussion started by: itik
2 Replies

7. UNIX for Dummies Questions & Answers

need a unix script to let me know by email or pager when the filesystem is 80% full.

Does anyone have a script to check disk space usage. My backup directory keeps filling up with archivelog files and I need a script to let me know by email or pager when the filesystem is 80% full. Thank you! (1 Reply)
Discussion started by: jzjy0r
1 Replies

8. UNIX for Dummies Questions & Answers

ALERT!!! ALERT!!! I messed up the UNIX!!!

Hello If you want a short description read my last thread! I have no root access anymore. No remote access! By user access i get a programm started and when i close it, i got logged off! So I guess I messed up the passwd file! is there a chance of booting a unix system (SCO-UNIX UnixWare... (15 Replies)
Discussion started by: Fwurm
15 Replies

9. UNIX for Advanced & Expert Users

process pager - by cell phone or just e-mail notify

hi all.. i need any help. i want to create in my crontab a simple script for verify any process and notify for the status in my e-mail or cell phone. anybody help me? (9 Replies)
Discussion started by: squash
9 Replies

10. UNIX for Advanced & Expert Users

Pager message from UNIX

Hi, we have written an auto emailer script for some autosys jobs getting delayed using C-Shell. We would also like to enhance this by sending out a page to the support personnel. Is there any way in C-Shell or autosys wherein we have the facility to send these pager messages ? Please help !! (1 Reply)
Discussion started by: pavankri
1 Replies
Login or Register to Ask a Question