how to monitor an AIX supsystem using Web-Based System Manager ?

Hi all,

I need to monitor an AIX supsystem called qdaemon to send me an email when it is down using Web-Based System Manager.
Using Web-based System Manager, i can create a new condition for a filesystem like /var or /tmp
but i dont know how to create a new condition to monitor qdaemon and send me an email when it is down.
see the attached file below,
what "resource class" and "monitored property" do i need to select ?
anyway, do you have another way to monitor qdaemon status ?
i know when it is down, no one can print.
thanks




qdaemon-status.bmp
gsawanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,
under 'Resource class' use 'Program', under 'Property' it's 'Processes'.
Under 'Monitored Resources'  enter as a selection string 'ProgramName=="qdaemon".

Under 'General' - 'Responses to condition' select your response (if you didn't create one see below, click OK anyway)
Creating a response
Go to 'Overview and Tasks' -> Create a new response.
Enter a name, then click 'add' .

 Under 'General' enter email address and options, under 'when in effect' click add, mark 'all day', 'Everyday' or whatever you want, then click 'set' and then OK.
 
If needed, go back to your condition and add your response - Under 'responses to condition' select your response from above (use the '<' arrow to add)
 
At last go to 'Overview ...' -> 'Monitor conditions' and verify that your new condition gets monitored. If not, select it on the right, click '< Start' and 'close'
Lokk at my next post!
 
wmp
 
woolmilkporcCommented:
... websm is not _that_ good monitoring tool!
I'd really suggest using nagios ->
 
www.nagios.org
 
wmp
 
gsawanAuthor Commented:
Hi guys,
i set it up as wmp's guide.
I will test it this afternoon and let you know.
thanks


Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

gsawanAuthor Commented:
Hi

pls see the 2nd and 3rd attached files below:

photo2.JPG
photo3.JPG
gsawanAuthor Commented:
pls have a look at those photo2 and photo3 above,

if i want to monitor the qdaemon, when it down, it will send me an email (already setup :"response to condition" the email address...)
what do i need to type in :"Event Expression" and Rearm expression" ?

if i leave it as what you see on the Photo2, what i receive is this one :
and it means nothing to me. I just want to receive email when it is down or crashed.

=====================================

Friday 11/14/08 11:15:02

Condition Name: qdaemonmonitor
Severity: Informational
Event Type: Event
Expression: Processes.CurPidCount != Processes.PrevPidCount

Resource Name: ProgramName == 'qdaemon'
Resource Class: IBM.Program
Data Type: CT_SD_PTR
Data Value: [2,1,{585908,1122310},{1122310}]
Node Name: server1
Node NameList: {server1}
Resource Type: 0
=====================================

woolmilkporcCommented:

Well,
unfortunately this is not that straightforward. Let's see!

1. If you only want to test whether qdaemon is running or not, please use under
'Condition -> General -> Event expression' only
ProcessesCurPidCount == 0
That will be enough. Your rearm expression is OK, as well as the selection string for monitored resources.

2. If we use the mail interface of websm, there is no possibility to change subject/body of the resulting mail.
So we will have to go another way. We will not use the builtin email function, but use an own script which will
exploit some environment variables we set for it and then send email.

So please go to the response you created and do the following:
- Mark under 'Action name' your created action -> Modify.
 Change the Action name to someting with suffix '_down'.
 Under Command to run select 'Run program' instead of 'Send mail',
 Under 'Enter program name' fill in the name of the script we will write, e.g.  
'/usr/local/scripts/event_mail'
- Check 'Run command when event occurs' _only_!
- Under the 'Environment' tab click 'Add',
 then define a first variable, RESOURCE, value 'qdaemon'.
 Repeat this by adding RECIPIENT, value 'your.email@address' and STATUS, value 'down'. Click OK
- In the 'Response' window, create a new Action by clicking 'Add'.
 Enter an Action name as something with suffix '_rearm'.
 Under Command to run select 'Run program'.
  Under 'Enter program name' fill in the name of the script above.
- Check 'Run command when rearm event occurs' _only_!
- Under the 'Environment' tab click 'Add',
 then define again a first variable, RESOURCE, value 'qdaemon'.
 Repeat this again by adding RECIPIENT, value 'your.email@address' and STATUS, value 'rearm'. Click OK
- Now, in the 'Response' window you should see two actions: one with suffix _down', one with suffix '_rearm'
 Click OK

3. Select 'Monitoring' in the left frame, in the right frame select 'Monitor conditions'. Verify that your
Condition still appears in the left window. If not, select it in the right window, then click ' < Start' and then
'Close'.

4. Put the script I appended in the right place on your machine, e.g. '/usr/local/scripts/event_mail'
Make it executable (chmod +x ...)
You can, of course, modify this script as you like, perhaps even by using more variables you defined like the
above.
Instead of echoing my poor string into the mail program, you could also feed a text file into it, by leaving out
the 'echo ...' up to the pipe '|' and adding '< [text_file_name'] at the end. You could also modify the text file
name using some of the variables, e.g. '> my_${RESOURCE}_${STATUS}_text_file', to make the script as flexible as
possible. Sure you must create the text file, e.g. 'my_qdaemon_down_text_file'

That's an interesting case we have her, so please test it and let me know what you think about my solution!

Good Luck!
Norbert (wmp)

#!/bin/ksh
echo "${RESOURCE} alert (${STATUS}) sent to ${RECIPIENT}" | mail -s "{$RESOURCE} ${STATUS}" ${RECIPIENT}
exit

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
woolmilkporcCommented:
... change the '>' before 'my_${RESOURCE}_${STATUS}_text_file' to '<'!
woolmilkporcCommented:
... and if we already use a script instead of pure email, how about adding 'startsrc -s qdaemon' to it after testing the content of $STATUS to be 'down'?
Just a hint ...
gsawanAuthor Commented:
Hi Norbert,

thanks alot for your information, i will need to test and get back to you as soon as i can.
cheers!
woolmilkporcCommented:
<<ping>>
 
gsawanAuthor Commented:
Hi Norbert,

Thanks alot for your help. I am still trying to get it to work based on your guide, i will get back here to update you soon.
thanks alot!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.