#UPDATE 06.07.2018# Since version 3.7 of vRNI the support user can no longer execute cli show-service-status due to permissions, so the line below will need to be updated



So this next post is a solution I built to monitor the health of vRNI using powershell and email alerting…

Anyone who has used vRNI knows that the thing doesn’t have an API to hit and query the state of the services…. the only way to check the health is to ssh in as the support or consoleuser and run the command “show-service-status” via the CLI….

As I needed to monitor this in an automated way and get alerted when something isn’t running I built the solution below in powershell using posh-ssh module and run it scheduled.

You will require the following structure

So that I don’t keep being prompted for the “support” user credentials I save the user and password with the powershell Get-Credential command.

Repeat the same for the SMTP server authentication

Script usage

now to the script… (you will want to update the mail server, sender etc variables and some other stuff below…)

I have started using github so make sure to check the latest version here

If a service is not running you should get an email like this with an attachment.

I know there is room for improvement… hope this helps someone… after all i cant do you whole job for you!