vFoglight can pull all sorts of information from vCenter. Pulling information is one thing, making it valuable is yet another. That is vFoglight’s incomparable strength.
Here is just one of many use cases. How about being able to track success and failure of your vRanger backups too? Backups can fail for a many reasons, usually infrastructure related. But the upshot is, that to maintain an SLA for backups, failed jobs should be repeated. Most existing vRanger users will know that they can check this through the vRanger logs. But this means that you have to be on the vRanger machine to do that. How about being able to alert on it via a rule in vFoglight and having the capability to push it through via a targeted email, SNMP or even a ticketing system, should you wish!
The solution is relatively straightforward and is testament to the flexibility inherent in the vFoglight platform.
Step one – create the rule!
Firstly this is a Multiple-Severity rule. We are only interested in warning (if a failed back up is a bigger deal in your environment, change this to critical so it can be picked up by SNMP or SCOM).
The code is provided below;
if (server.get("DataService").retrieveLatestValue(scope, "notes").getValue().contains("Failed"))
It refers to the VM notes field in vCenter for each VM and searches for the word Failed. You will also need to type in an appropriate message. The only extra piece required is the addition of the VM name variable used in the actual error message. Set up a rule variable called name with the following expression, return scope.get("name"); You can refer to this later, in the error message text as @name.
Step two – scope the rule.
The rule is scoped for VMWVirtualMachine. This is where the VM notes field is located. The previous code scanned the notes for the word ‘Failure’ and that is pretty much our alarm. The rule should be a time driven trigger. You may want to run this every 12 or 24 hours.
Step three – test the rule.
Change a notes field or look for a VM that actually has a failed backup. You should receive an error message as above. If you have set this to trigger an email, then you should have one of those in your inbox at the same time.
I can get email alerts from vRanger too. However when I use scoping in vFoglight I can get a lot more granular in terms of filtering what’s really important from what’s not as important. E.g. Pre-Production Cluster VMs and Production Cluster VMs. This means we can forward alerts to those responsible for backups in that area. In fact if you look at the graphic above, vFoglight will also provide that information in context and let you know which services are impacted by the failure.
As mentioned before, this is one of many use cases we have come across within our customer base. Look out for more of these to be blogged about in the very near future. Or, if you have any of your own examples – please let us know!
PS. Here is the dashboard for the alerts, just for Lothar ;)
It is a simple alarm view with a filter set with the message origin containing 'vRanger';