Testresult with CRLF not correct

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).
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Testresult with CRLF not correct

Post by plambrecht »

Hi,

When I have a test (shell script) that returns a CRLF in a reply, all info after the CRLF is removed from the Reply.

eg : scriptres:OK:Incomplete<crlf>Error: Tape not found

Is there a way to have this fixed ?

Or can we have HTML email messages ?
I see that you send a "Content-Type: text/plain; charset="iso-8859-1""
Could you add an option to specifiy "Content-Type: text/html"
that way I can add "<br>" in stead of "CRLF"

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

Post by KS-Soft »

When I have a test (shell script) that returns a CRLF in a reply, all info after the CRLF is removed from the Reply.
Is there a way to have this fixed ?
This is correct behavior. Script should return result in single line.

- Fix? No. If we change this behavior (use more lines), some other scripts that other customers have written may work incorrectly.

- Some workaround? H'm... Yes, probably we can implement HTML e-mail... need to check

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

This is correct behavior. Script should return result in single line.
Checked the way the tmp files are generated.. looks obvious now...
Some workaround? H'm... Yes, probably we can implement HTML e-mail... need to check
It is possible to select the charcode for an email template... maybe just add 'html' to that list ?

One more thing, my Temp folder is piling up with tmp files, generated bij the Agent... Shouldn't they be removed after the test (shell script) has returned the result ?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Ok, there is update at www.ks-soft.net/download/hm481.zip
Add "HTMLMail=1" into [SMTP] section of the hostmon.ini file.
Please note: you will need to redesign your mail profiles.

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

Post by KS-Soft »

One more thing, my Temp folder is piling up with tmp files, generated bij the Agent... Shouldn't they be removed after the test (shell script) has returned the result ?
Yes, they should be removed.
Cannot reproduce this problem on my system.
As usualy need more information
- Windows version?
- Service Pack?
- RMA version?
- started as service or application?
- account?

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

RMA:
- Win2K3, fully patched
- RMA 2.00
- as administrator
HM:
- W2K3 Fully patched
- 4.80
- as service as administrator

I have the problem only on one or 2 of my RMA servers.
When this happens, the test gives an RMA error 301 - script timeout
Timeout is set to 2 minutes on script and on the RMA.

My script uses the RegOBJ.dll, maybe it has to do with that dll. It is an ActiveX to access the registry on a remote machine.

P.
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

KS-Soft wrote:Ok, there is update at www.ks-soft.net/download/hm481.zip
Add "HTMLMail=1" into [SMTP] section of the hostmon.ini file.
Please note: you will need to redesign your mail profiles.
Alex. Thx alot ! this adds a great value to my alerts that I can send...
Nice formatted HTML docs....

thx

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

Post by KS-Soft »

Alex. Thx alot ! this adds a great value to my alerts that I can send...
Nice formatted HTML docs....
I think official release will provide HTML/Text option separately for each mail profile.
We will need to change macro resolving depending on this option. E.g. "CPU <local comp>" test name should be resolved to "CPU <local comp>" and so on...

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

Post by KS-Soft »

I have the problem only on one or 2 of my RMA servers.
When this happens, the test gives an RMA error 301 - script timeout
Timeout is set to 2 minutes on script and on the RMA.
Looks like Windows locks file for a while AFTER process is terminated.
Try this update www.ks-soft.net/download/rma202.zip

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

Post by KS-Soft »

So, how new RMA works on your system?

There is update at www.ks-soft.net/download/hm484.zip
It allows you to specify Text/HTML option for each mail template and resolves test related macro variables according to that option.

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

So, how new RMA works on your system?
Looks like a great improvement... all expect one test are completed...

thx for the quick response !! I still don't regret choosing HM over a lot of other monitoring tools (N-Able, Monitormagic,...)

P.
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

There is update at www.ks-soft.net/download/hm484.zip
It allows you to specify Text/HTML option for each mail template and resolves test related macro variables according to that option.
Thx thx thx !

Do I still need that HTMLMail=1" into [SMTP] section or is that obsolete now

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

Post by KS-Soft »

Do I still need that HTMLMail=1" into [SMTP] section or is that obsolete now
It is obsolete now

Regards
Alex
User avatar
plambrecht
Posts: 151
Joined: Wed May 19, 2004 8:11 am
Location: Belgium
Contact:

Post by plambrecht »

We will need to change macro resolving depending on this option. E.g. "CPU <local comp>" test name should be resolved to "CPU <local comp>" and so on
Hm... messed up my idea :(

My idea was to have a reply generated by my script that contains HTML formatting...

like 'Successful<brt>Errors/warnings: 0/4<br>W0001 - some warning msg<br>W0001 - some warning msg<br>W0001 - some warning msg<br>W0001 - some warning msg'

With the first html capability, it worked as expected, but now the < and > are translated to < and >.....

any suggestions on a workaround or improvement ?

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

Post by KS-Soft »

Quote from future manual:
If you choose HTML option for mail template, HostMonitor will resolve test related macro variables according to HTML encoding rules. E.g. test name “<local comp>” will be translated to “<local comp>”. User defined variables and folder related variables would be substituted as is. This allows you to use folder comments and user defined macro variables to store HTML code (can be used as styles).
It means you may use some user defined variable instead of <br>. Like Successful%HTMLBR%Errors/warnings: 0/4%HTMLBR%W0001 - some warning msg%HTMLBR%W0001 - some warning msg%HTMLBR%W0001 - some warning msg%HTMLBR%W0001 - some warning msg
Where %HTMLBR% should be defined in User Defined Variables dialog as <br>

Regards
Alex
Post Reply