Macro mask

Need new test, action, option? Post request here.
Post Reply
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Macro mask

Post by niallser »

Due to certain regulations it can happen that certain data from a macro used in the subject line or body of an email may breach a GDPR or DORA regulation. If it doesn't breach the regulation it may breach a client or customer policy.

Can we get an option to print only part of a macro result?

The idea is to be able to select a certain number of characters from the left, right, (or centre?) of a resolved macro?

For example where %host% prints the entire server name, can we have an option e.g. %host(r4)% that would print the last 4 characters of the hostname. Similarly %host(l4)% would print the first 4 characters.

Whatever format works where, we can hide certain parts of the macro and see only the part that is relevant to the email recipient.

Thanks,
Niall
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

Can we get an option to print only part of a macro result?
Sorry, I do not understand what means "print" in this case.
When you setup Send e-mail action using Action Properties window, you type variable name e.g. %udv_targetaddress%, you do not see customer data.
When HostMonitor starts this action it resolves variable and uses its value. So e-mail is sent to correct address.
If HostMonitor will use part of the address, then mail server will not be able to send e-mail to correct address.

Or you want to provide e-mail with reduced information about the problem? Do you want to get e-mail alert with message like
"Disk failure on server 10.10.x.x in xxxoffice"
instead of normal message
"Disk failure on server 10.10.5.1 in LondonOffice"

Regards
Alex
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

Ok.

If I have a test looking at a server with the name "myWebServer1234" and I use %host% in the testname, when I look at the tests list I can see
process x on \\myWebserver1234

In the email alert I can see the subject is " Alert 5432 Status Bad: Test for process x on \\myWebserver1234"

What I want is for the email to state "Alert 5432 Status Bad: Test for process on server1234

We generally use %object% on %host% as the Test name, and in the email we call the %testname% as the subject line.

The intention here is to mask out or remove parts of what the macro returns so if an email is intercepted the data is insufficient for someone unfamiliar with the targets.
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

"Or you want to provide e-mail with reduced information about the problem? Do you want to get e-mail alert with message like
"Disk failure on server 10.10.x.x in xxxoffice"
instead of normal message
"Disk failure on server 10.10.5.1 in LondonOffice""

Hi Alex,

Yes, that's essentially it - only we tend to use %host% to get the name rather than %HostAddr%

Thanks,
Niall
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

I think there is no %host% variable, just %hostname%.
May be we can implement variable like %DisguisedHostName% and add some "disguise" parameters :roll:
On the other hand you may use %CommentLine..% variables

Regards
Alex
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

Hi Alex,

On Version 9.5 %host% brings in the server name on the test.

I tried %hostname%, and it does nothing. I'll test this on a later version in case this is version-related.

My understanding is that if we use the CommentLine macro it would be the same as putting a manual name into the Testname field.

I can see where there is a %commentlineNN% variable but I cannot see where I can pull a set number of charters from a comment line.
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

My idea would be a new macro that is placed immediately after an existing macro and takes the specified number of characters from the right or left of whatever the macro returns.

A macro to replace characters in certain positions might be useful too as in your earlier IP address example.
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

Do you need this option for many variables?

Regards
Alex
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

Hi Alex,

I tried to attached an image of a sample use case where you can also see the %host% resolving :)
Got an error "Could not upload attachment to ./files/2037_deb57b4475ac4a07bf984697ec1e5e3a."

Test Name in the test has %object% on %host%

The subject line of the email calls %testname%

In this case only the %testname% would need the option as the server name would appear at the end of the string.


Cheers,
Niall
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

In first post you said
macro used in the subject line or body of an email
so I was thinking about variables that can be used as action parameters
https://www.ks-soft.net/hostmon.eng/mfr ... .htm#macro

But now I understand, you are talking about test (template) related variables
https://www.ks-soft.net/hostmon.eng/mfr ... pvariables

May be we need to add 2 new variables to actions and tests modules..
We don't want to support expressions in this case, this may slow down HostMonitor a little bit and looks like other customers do not need it (at least never asked about such option).
Got an error "Could not upload attachment to .
We will check this..
Also you can use e-mail to contact us and provide details (e.g. HostMonitor menu Help->Support). Over 95% of our customers use e-mail, not the forum

Regards
Alex
niallser
Posts: 14
Joined: Wed Jan 18, 2006 8:09 am
Location: Dublin, Ireland

Re: Macro mask

Post by niallser »

KS-Soft wrote: Fri Nov 08, 2024 8:38 am ... and looks like other customers do not need it (at least never asked about such option).
Hi Alex,

Understood, and we didn't need this either until recently.

You may be aware of GDPR in the EU, which controls client data. A new directive called DORA covers system resilience.

This requirement is a fallout from the DORA requirements, as we will be subject to client audits and will need to prevent any details that could compromise a system or be used by a hacker from getting into the wild.

As noted, this might be a helpful option as it allows useful information to be passed from client to service provider while making the information useless to anyone outside the relationship if the emails are intercepted. The idea is that it would work similar to how security checks send you the last 4 digits of your credit card or last 2 digits of your cell phone when running checks from webpages.

Currently, the emails contain the full server names and instructions on what to do when they get there.

For now, we are removing any clear details from the subject lines of the emails and working on new procedures so the support staff will know which server to access.

Cheers,
Niall
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

So, you need variables like the following?
%DisguisedHostName%
%DisguisedHost%
%DisguisedPath%
%DisguisedObject%

And some new options like
[DORA]
DisguiseMode=left|center|right
DisguiseRatio=50
NonDisguiseLen=10
DisguiseChar=?
DisguiseLen=4

Lets move to private conversation by e-mal
KS-Soft
Posts: 12944
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Re: Macro mask

Post by KS-Soft »

How new update works? does it fit your needs?

Regards
Alex
Post Reply