Hi,
I have a shell script which will return as reply a decimal number, f.e. 20.4
I would like to use the "Tune up Reply value" function to monitor, if the values will be increase since the last check.
Is it possibile to calculate with decimal numbers?
I try to use ['%SuggestedReply%' - '%SuggestedLastReply%'] altough this isn't working.
Any idea?
Thank you in advance
Martin
Tune up Reply value - calculating with decimal numbers?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Each calculation will be rounded to integer number.Is it possibile to calculate with decimal numbers?
I try to use ['%SuggestedReply%' - '%SuggestedLastReply%'] altough this isn't working.
You may use the following expression to display difference with one decimal number:
if (('%SuggestedReply%'*'10'-'0%SuggestedLastReply%'*'10')>=0) [('%SuggestedReply%'*10-'%SuggestedLastReply%'*10) div 10].[('%SuggestedReply%'*10-'%SuggestedLastReply%'*10) mod 10]; else -[('-%SuggestedReply%'*10+'%SuggestedLastReply%'*10) div 10].[('-%SuggestedReply%'*10+'%SuggestedLastReply%'*10) mod 10]
Please note, your system decimal separator should be the same, as returned by your script.
If you need to use "Use Warning status if" or "Use Normal status if" expressions to determinate value growth, you may use expression like this:
('%SuggestedReply%'*10-'0%SuggestedLastReply%'*10)>4
Please note: this expression becomes true when Reply grows more than 0.4
Thanks for the quick reply.
Unfortuantely I will get this error:
The script return a decimal separator a dot (f.e 27.3 or 27.4 ...)
Thanks,
Martin
Unfortuantely I will get this error:
Code: Select all
Error in expression [('-27.3'+10'27.4) div 10): '-27.3' is not number
Thanks,
Martin
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
This means, you have decimal separator on the system that differs from [ . ] (e.g. [ , ])
You may:
1. Change default system decimal separator to [ . ] (Control Panel> Region and Language> Format tab > Additional Settings>)
2. Modify script to return values with decimal separator that corresponds to system settings.
Also, your error should look exactly like this:
Otherwise you have used incorrect expression (different, than I have provided in previous post.)
You may:
1. Change default system decimal separator to [ . ] (Control Panel> Region and Language> Format tab > Additional Settings>)
2. Modify script to return values with decimal separator that corresponds to system settings.
Also, your error should look exactly like this:
Code: Select all
Error in expression [('-27.3'*10+'27.4'*10) div 10]: '-27.3' is not number
I changed the decimal seperator now to [.] and also restartet the server (Windows Server 2008 R2, English). Unfortunately the same problem, the error looks exactly like this:
Any other idea?
Code: Select all
Error in expression [('-31.7'*10+'31.7'*10) div 10]: '-31.7' is not number
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
HostMonitor started as Service ?
Then you'll probably need to change Decimal Separator for Local system account:
1. Check/Change Decimal Separator for current user account (Control Panel> Region and Language> Format tab > Additional Settings)
2. Click the Administrative Tab
3. Click 'Copy to reserved accounts'
4. Select 'System accounts (local system, local service, and network service)'.
5. Click OK/Apply
6. Restart HosrMonitor Service.
Then you'll probably need to change Decimal Separator for Local system account:
1. Check/Change Decimal Separator for current user account (Control Panel> Region and Language> Format tab > Additional Settings)
2. Click the Administrative Tab
3. Click 'Copy to reserved accounts'
4. Select 'System accounts (local system, local service, and network service)'.
5. Click OK/Apply
6. Restart HosrMonitor Service.
Thanks, that's it ...HostMonitor started as Service ?
Then you'll probably need to change Decimal Separator for Local system account:
1. Check/Change Decimal Separator for current user account (Control Panel> Region and Language> Format tab > Additional Settings)
2. Click the Administrative Tab
3. Click 'Copy to reserved accounts'
4. Select 'System accounts (local system, local service, and network service)'.
5. Click OK/Apply
6. Restart HosrMonitor Service.

HM is running as Service
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: