A nice feature for us would be a warranty check. To follow up on our Warranty for our Hosts (ESX, SAN,...)
Input
1 - Alert Window (f.e.: 60 days)
2 - Warranty Expiry Date (dd/mm/yyyy)
Output
Number of Days warranty left (from today).
Turns bad when Output < Alert Window
Or is there another test that can be used for this?
[SOLVED] Warranty date check
-
- Posts: 10
- Joined: Wed Jul 12, 2017 7:56 am
[SOLVED] Warranty date check
Last edited by HelpdeskIVAGO on Tue Oct 10, 2017 7:13 am, edited 1 time in total.
-
- Posts: 10
- Joined: Wed Jul 12, 2017 7:56 am
-
- Posts: 10
- Joined: Wed Jul 12, 2017 7:56 am
Sound like you need Organizer software, not monitoring software
If you need simple alarm clock within HostMonitor, I think you can use Shell Script test method and simple script that will check date and return Bad or Ok status with some comment for Reply field of the test (e.g. "vSphere license will expire in 20 days").
Regards
Alex

If you need simple alarm clock within HostMonitor, I think you can use Shell Script test method and simple script that will check date and return Bad or Ok status with some comment for Reply field of the test (e.g. "vSphere license will expire in 20 days").
Regards
Alex
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You may use the following VB script with Shell Script test method:
start cmd: cmd /c cscript /B /E:VBScript %Script% %Params%
Script requires 2 parameters: <end date> and <Number of days for the alert>
Code: Select all
Option Explicit
On Error Resume Next
const statusUnknown = "scriptRes:Unknown:"
const statusOk = "scriptRes:Ok:"
const statusBad = "scriptRes:Bad:"
Dim objArgs, textdate, dat, diff, baddiff
Set objArgs = WScript.Arguments
If objArgs.Count <> 2 then
WScript.StdOut.Write statusUnknown & "script requires 2 parameters <date> <N days to the end of the term>"
WScript.Quit
end If
textdate = objArgs(0)
baddiff = int(objArgs(1))
dat = CDate(textdate)
diff = DateDiff("d",Now,dat)
If diff <= baddiff then
WScript.StdOut.Write statusBad & diff & " (" & textdate & ")"
else
WScript.StdOut.Write statusOk & diff
end If
Script requires 2 parameters: <end date> and <Number of days for the alert>
-
- Posts: 10
- Joined: Wed Jul 12, 2017 7:56 am