report for every hour

Exchange HTML report templates between users.
Post Reply
babar.munir
Posts: 30
Joined: Wed Jan 23, 2013 3:43 am
Contact:

report for every hour

Post by babar.munir »

i have configured ram and cpu usage alerts for one of my server after 2 minutes. which generates email alerts in case of bad status. but now i want to configure auto generated report for these alerts after every one hour and send this report to my manager id so that he can view the status of ram and cpu on server for last hour? any help will be appreciated
KS-Soft
Posts: 12903
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Lets clear some terms

>i have configured ram and cpu usage alerts
As I understand you setup Memory and CPU Usage TESTS (not alerts)

>send this report to my manager id so that he can view the status of ram and cpu on server for last hour

Report or Log?
Reports show current test status, also it may show statistics counters (e.g. Alive/Dead ratio since last counters reset or Alive/Dead ratio for last 24 hours, last week, etc).
Samples:
http://www.ks-soft.net/hostmon.eng/exam ... /sla2b.htm
http://www.ks-soft.net/hostmon.eng/exam ... charts.htm
Report will not show you what exactly happened 20 or 30 minutes ago.

Log shows tests results, like this
http://www.ks-soft.net/hostmon.eng/examples/log.htm
You may setup private logs just for these 2 tests and you may tell HostMonitor to change log file every day but it will show events starting from midnight (not just 1 hour).

Regards
Alex
babar.munir
Posts: 30
Joined: Wed Jan 23, 2013 3:43 am
Contact:

Post by babar.munir »

thanks for clarification..

->You may setup private logs just for these 2 tests and you may tell HostMonitor to change log file every day but it will show events starting from midnight (not just 1 hour).


yes our HM generates log on daily basis.. is it possible to change the log file format or convert into such graphical way after every hour.. ?

and how can i send log to my manger email id after every one hour from host monitor?
KS-Soft
Posts: 12903
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

yes our HM generates log on daily basis.. is it possible to change the log file format
Change log format? Sure, you may choose format of the log file:
HTML file
Text file
DBF file
Change log format every hour? I am not sure it makes any sense...
or convert into such graphical way after every hour.. ?
Log Analyzer can generate reports with charts
Log Viewer can generate charts
http://www.ks-soft.net/hostmon.eng/la/index.htm
http://www.ks-soft.net/hostmon.eng/lv/index.htm
You may setup HostMonitor to start these utilities using "Execute external program" action
http://www.ks-soft.net/hostmon.eng/mfra ... htm#actPrg
and how can i send log to my manger email id after every one hour from host monitor?
How to send e-mail? Use Send e-mail action.
How to start action every 60 min? Use built-in Scheduler (Options dialog -> Scheduler page)

Regards
Alex
babar.munir
Posts: 30
Joined: Wed Jan 23, 2013 3:43 am
Contact:

Post by babar.munir »

thanx a lot .. cleared up lot of confusion.

I have configured private log i.e CPU_%mm-dd-yy%.htm which auto generates html log on daily basis.. and saves as html file like "CPU_12-01-14.htm"
"CPU_12-02-14.htm" and so on..

now i have configured action profile with file attachment (i.e CPU_12-18-14.htm) for sending email and emails are delivering successfully after every one hour.. but the log file name changes daily according to the current date format ..so is there any way/variables to send current date file attachment automatically ?
KS-Soft
Posts: 12903
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sure, you may use variables.
There is list
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro
http://www.ks-soft.net/hostmon.eng/mfra ... #timemacro

E.g.
C:\ProgramData\HostMon\Logs\CPU_%mm%-%dd%-%yy%.htm

Regards
Alex
babar.munir
Posts: 30
Joined: Wed Jan 23, 2013 3:43 am
Contact:

Post by babar.munir »

thanx i already tried it.. but it does not attach the log file with email and send an error text in email

Error: Attachment file not found (G:\HMReports\192.2\Dec-14-192.2-logs\CPU\CPU_192.2_%mm-dd-yy%.htm)

though my logs path is

G:\HMReports\192.2\Dec-14-192.2-logs\CPU\CPU_192.2_12-18-14.htm
KS-Soft
Posts: 12903
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Wrong variable. Please check how it looks in my post
---
C:\ProgramData\HostMon\Logs\CPU_%mm%-%dd%-%yy%.htm
---

Regards
Alex
babar.munir
Posts: 30
Joined: Wed Jan 23, 2013 3:43 am
Contact:

Post by babar.munir »

thans a lot ..yup i missed it.. just last question for my understanding.. whn i use %mm-dd-yy% in my private log.. log automatically generates on daily basis. as you can see in my previous post.. but when i use same variable while attaching the file.. it does not work.. so what is the difference?
KS-Soft
Posts: 12903
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Tests, actions, reports, logging modules support different variables.
Some variables can be used in all modules, some not.
Please check the manual

Test related variables (templates)
http://www.ks-soft.net/hostmon.eng/mfra ... #templates

Variables for file related tests
http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros

Variables then can be used with actions
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro

Reports
http://www.ks-soft.net/hostmon.eng/mfra ... m#RepMacro

Logging
---
If you select option to automatically change the log file date macro variables may be specified in the log file name. HostMonitor interprets text between the '%' of the log name as a macro, where 'DD' represents the day of the month, 'WW' - current week number, 'MM' - the month, 'YY' - the year in two digit format, 'YYYY' - the year.
---

Regards
Alex
Post Reply