|
View previous topic :: View next topic |
Author |
Message |
ataudte
Joined: 23 Apr 2008 Posts: 28 Location: FFM, Germany
|
Posted: Tue Jun 24, 2008 8:00 am Post subject: Refresh Reply at the same Status |
|
|
Hello everybody,
I got a problem with the reply of a shell script.
I wrote a shell script to test tablespaces of an Oracle database at Solaris. After testing, I got the reply with the overfilled tablespaces or everything is okay. The reply is shown correctly in HM's Quick log and I can send it via mail (used variable: %Reply_CStyle%).
In the shell script:
Code: |
...
if [ "$reply" != "" ]; then
echo "ScriptRes:Bad:$reply"
else
echo "ScriptRes:Ok:Tablespaces ok"
fi
...
|
In the mail:
Code: |
X Server4711 [DATA (57)] X Server0815 [SYSTEM (99)]
MACHINE [TABLESPACE (FILL LEVEL)], separated with 'X'
|
And now I want be alarmed if the reply changes, e.g. a new tablespace is listed or the fill level has been changed. But the problem is, the HM just updates the reply if the status has been changed.
If I'm switching between testing and reverse-testing (thus the status changes), the reply is up-to-date, but if the test is controlled by HM, the reply is still the same, even if a new tablespace should be listed, because it's the same status. If all tablespaces come right, the status changes and the test (controlled by HM) got an up-to-date reply.
As long as the status is "Bad", the reply is till the same like at the time when the test became bad.
Any Idea?
Thank you for taking the time to help me.
ataudte |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue Jun 24, 2008 8:26 am Post subject: |
|
|
Quote: | But the problem is, the HM just updates the reply if the status has been changed |
Test item just show status and reply provided by your script. If script returns different reply every time, HostMonitor will update Reply field of the test every time as well. Its not related to status.
May be you are talking about some other "reply"? Reply displayed by Quick log? Reply displayed in the log file? Reply value that was sent by "send e-mail" action?
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
ataudte
Joined: 23 Apr 2008 Posts: 28 Location: FFM, Germany
|
Posted: Tue Jun 24, 2008 8:39 am Post subject: |
|
|
I mean the reply, which is listed in Quick log. I'm sending the same value via an external mail programm using the variable %Reply_CStyle%.
For clearer understanding:
- Reply at Quick log:
Code: |
X Server4711 [DATA (57)] X Server0815 [SYSTEM (99)]
|
- reply in mail, using external mail program and variable %Reply_CStyle%
Code: |
X Server4711 [DATA (57)] X Server0815 [SYSTEM (99)]
|
It works great, but if the test becomes bad, the reply (Quick log & %Reply_CStyle%) is not updated.
I defined the script in Script Manager and if I'm using the "Leys try" option via the RMA (Solaris - SPARC) I got the right reply. At the moment the test runs every second, but the reply is not up-to-date, it's the same like the switch from OK to Bad happens. The status is still bad and that's correct, but the reply of the test is no updated.
I hope it's understandable now ... :-\
ataudte |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue Jun 24, 2008 8:46 am Post subject: |
|
|
If you want to see all replies in Quick Log, set logging mode to Reply or Full (options located in Test Properties dialog)
Quote from the manual Quote: | Use common log
If the "Use common log" option is selected, HostMonitors records test data in a single log file (or database) shared by all tests. Common log settings located on Log Settings page in the Options dialog.
Choose one of the following options to specify when information should be recorded:
- Default - the default logging mode specified in the Options dialog will be used (note: you may use different settings for Primary and Backup logs);
- Brief - record information whenever status of the test changes;
- Full - record all test results, regardless of whether their status had changed or not;
- Reply - record information into log every time the status or reply value of the test changes.
Use private log
Additionally, for each test you can define its own, dedicated log file by checking the "Use private log" option. The type of a private log is determined based on the file extension: HTML for .htm*, DBF for .dbf, plain text for any other extension.
Private logs can be configured to work in one of the following modes:
- Default - the Primary log settings defined in the Options dialog are used;
- Brief - record information whenever status of the test changes;
- Full - record all test results, regardless of whether their status had changed or not;
- Reply - record information into log every time the status or reply value of the test changes. |
While Quick Log checks both options. If any (private or common) logging mode set to Reply, HostMonitor will use "Reply" mode for Quick Log.
Note: such condition works even if you disable "use private log" option
BTW: it has nothing to do with a script or agent for unix. Its basic logging rules applicable for any test.
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
ataudte
Joined: 23 Apr 2008 Posts: 28 Location: FFM, Germany
|
Posted: Tue Jun 24, 2008 8:55 am Post subject: |
|
|
Great thanks and kiss on the hand.
It works! The Logging mode "Full" updates the reply, if it has been changed. Now I can define an Action Profile, which sends mail if reply is not the same like last reply.
Thank you very much!!!
ataudte |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue Jun 24, 2008 9:40 am Post subject: |
|
|
You are welcome
However I should say actions have nothing to do with Quick Log either. You could setup action without touching log settings.
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|