Sending Log Files without a specific error

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
rollohmasker
Posts: 16
Joined: Mon Jan 08, 2007 6:32 am

Sending Log Files without a specific error

Post by rollohmasker »

Hi all,
i want to send a log File with EMAIL every day at a specific time, without the occurency of a specific erroor.
I can not find this possibility, but i am not very firm with the program up to now.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Could you provide more information, please? What version of HostMonitor do you use?

There are several ways to figure it out.
1. You may setup "Folder/File Availability" test ( http://www.ks-soft.net/hostmon.eng/mfra ... #fileexsts ) to check if certain log file exists, and assign action profile with "Send Email" action ( http://www.ks-soft.net/hostmon.eng/mfra ... m#actEMail ) to send this log file by email. Please note, "Send Email" action offers you "Attach file" option. You can mark this option and select file that will be attached to the message. To perform test once a day, you may use "Irregular schedule" with "Start test once a day" option enabled. http://www.ks-soft.net/hostmon.eng/mfra ... htm#Dialog

2. You may create certain action profile with "Send Email" action and schedule it to start once a day using build-in Scheduler (menu Options > Scheduler).

You may use special directive like <<IncludeFile=path_to_the_file>> inside Mail template body, to attach certain file to the mail template. http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails

Regards,
Max
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Why did you post this question using "Problems and Bugs" forum?
Something works incorrectly?

Regards
Alex
rollohmasker
Posts: 16
Joined: Mon Jan 08, 2007 6:32 am

Post by rollohmasker »

Excuse me, i am new here, but where is the best place to put my question.
Is it better in FAQ?

Solution 1
If i check the File availability, the log file was send, but the test will be red after running.
Because "Alert when file exists".
How can i bring it after sending to a non error status, because all see the whole day, the red error status of KSHost.

Solution 2
If i create a action profile, i think i must give a error status to activate the action profile.
If i want to start it only from the schedule options, a message
"Select action profile does not contain any "scheduled" action.
appears.

Normaly I want only to send this file, without checking anything.
Or is there a better way to do it?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

rollohmasker wrote:Excuse me, i am new here, but where is the best place to put my question.
Is it better in FAQ?
I think, "Installation and configuration" branch is more suitable in this case.
rollohmasker wrote:Solution 1
If i check the File availability, the log file was send, but the test will be red after running.
Because "Alert when file exists".
How can i bring it after sending to a non error status, because all see the whole day, the red error status of KSHost.
You may use "Reverse alert" option.
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... htm#Dialog
==================
Reverse alert
When this option is selected, HostMonitor regards test results that are normally considered benign, as abnormal ones, and vice versa.
==================
rollohmasker wrote:Solution 2
If i create a action profile, i think i must give a error status to activate the action profile.
If i want to start it only from the schedule options, a message
"Select action profile does not contain any "scheduled" action.
appears.
There are 3 different types of starting condition: "standard mode", "advanced mode" and "on the schedule". http://www.ks-soft.net/hostmon.eng/mfra ... properties

To use action profile within the built-in Scheduler, all actions in this profile should be specified as "on the schedule". http://www.ks-soft.net/hostmon.eng/mfra ... uledaction
rollohmasker wrote:Normaly I want only to send this file, without checking anything. Or is there a better way to do it?
Solution 2 exactly suits your needs. You just should specify "on the shedule" in "Condition to start action" combobox in "Action Properties window" of "Send-Email" action.

Regards,
Max
rollohmasker
Posts: 16
Joined: Mon Jan 08, 2007 6:32 am

Post by rollohmasker »

Hello,
thank you for the tips, but it didn`t work with my equipment.
I use last version of Host Monitor: Version 6.52
I send you all my configuration about this, and i hope you can help
me.

Solution 2
I created a Action Profile named: test logfile
with the following parameters

Action Type: Send e-mail
Action name: Send e-mail
Executes by: HostMonitor
Condition to start action: on the schedule
Time restriction use schedule:
here i tested with a schedule or nothing selected.
Action Parameters:
From:xxx@xx.de
To: yyy@yy.de
Priority Normal
Subject: KS Host Error
Body template: Mail to admin
Attach file G:\CollectLogs\zzzz.log

Under options i go to schedule
put in
daily every day ..................... at 13.52 test logfile

Save and wait for the time i put in, but nothing happens.
I don`t know what i make wrong.

Also solution 1 did not work fine

Method = FileExists
;--- Common properties ---
;DestFolder = Root\
Title = \Gesamt_Vortag1.log
Disabled = Yes
Comment = G:\CollectLogs\Gesamt_Vortag1.log
RelatedURL =
ScheduleMode= OneTestPerDay
ScheduleTime= 11:07:00
Alerts = Send Log
ReverseAlert= No
UnknownIsBad= No
WarningIsBad= No
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
File = G:\CollectLogs\Gesamt_Vortag1.log
OkIfExists = Yes
UseMacros = No

If i do uncheck Reverse alert, the Log file is send but it stay in a red error state.
If I checked Reverse alert, nothing happens.

regards
Rollo
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

rollohmasker wrote:Solution 2
I created a Action Profile named: test logfile
with the following parameters
...
Save and wait for the time i put in, but nothing happens.
I don`t know what i make wrong.
Settings look fine. I would recommend you to use another schedule entry to setup daily schedule. There are five separate entries in the list.
rollohmasker wrote:Also solution 1 did not work fine
If i do uncheck Reverse alert, the Log file is send but it stay in a red error state. If I checked Reverse alert, nothing happens.
If you cheked "Reverse alert" option, you should change actions set for the "Send email" action in "Actions Profile" window. If action was placed into "Bad" actions set, you should place it into "Good" actions set and vice versa.

Regards,
Max
rollohmasker
Posts: 16
Joined: Mon Jan 08, 2007 6:32 am

Post by rollohmasker »

Hallo,
Now I changed to the third schedule entry, and it works.
But the Mail i received has not filled out the variables.
See the following E_Mail body.
I used the "Mail to admin" profile.
I used it often before, and it works fine, but in this case not.
Do anybody know what i do wrong?

E-Mail body:
Message from HostMonitor (host changed status)

Test : %TestName%
Method: %TestMethod%
Status : %STATUS%
Date : %DATETIME%
Reply : %Reply%

Recurrences : %Recurrences%
Last status: %LastStatus%
Total tests: %TotalTests%
Alive ratio : %AliveRatio%
Dead ratio: %DeadRatio%

Folder: Root

Regards
rollohmasker
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

rollohmasker wrote:Now I changed to the third schedule entry, and it works.
Glad to hear that.
rollohmasker wrote:But the Mail i received has not filled out the variables.
Such variables have sence when the action profile is assigned to the particular test and represent parameters of the same test that had triggered an action. In your case, action profile was triggered by the Scheduler, so these variables are not resolved because no test were performed.

Actually, I do not think you really need variables like %TestName% in this case. You just should create new mail template and assign it to the particular "Send Email" action. http://www.ks-soft.net/hostmon.eng/mfra ... .htm#Mails

Regards,
Max
Post Reply