Monitorizando los Jobs de los Agentes de Veeam Backup and Replication

If we typically use the Veeam Backup and Replication Agent in our organization to back up our computers, laptops or servers; we will use this post to centralize and of course have all our backups in Centreon perfectly controlled!

 

As I suppose we all know by now, with Veeam Backup and Replication we can install an Agent on remote machines to be able to back them up, if we already have a Centreon installation, we can check from there if the tasks or Job copy of the Agents have been carried out well or not. This is yet another item that we centralize in our monitoring tool, fewer things to manually control or take into account!

 

With this Wonderful Script of PowerShell we will be able to verify in a very simple way if the task of copying the Agent ended correctly, Bad or with some warning, What it does is look in the computer's event viewer for the task logs and read its status. Therefore, the teams will have to be consulted from Centreon with the Agent through NRPE, to run the script remotely, Read your output, and treat it. We will install NSClient++ in the workstations, If you need some help on this topic, Check out This post.

 

I had to make some modifications to the script, as events are stored in a different log in my Event Viewer, In my case it's called “Veeam Agent” and that will have to be indicated to the script, Modified:

On the line 34:

[SourceCode]Change: $ArgLogName = "Veeam Endpoint Backup"
By: $ArgLogName = "Veeam Agent"[/SourceCode]

 

On the line 36:

[SourceCode]Change: $ArgProviderName = "Veeam Endpoint Backup"
By: $ArgProviderName = "Veeam Agent"[/SourceCode]

 

And finally on the line 73:

[SourceCode]Change: if ($LogEntry.Message.ToString() -like "*EndpointBackup job ''Backup Job*")
By: if ($LogEntry.Message.ToString() -like "*Veeam Agent ''Backup Job*")[/SourceCode]

 

As usual, We save the script in “%ProgramFiles%NSClient++scripts”, we can open a PowerShell console and try to run it to verify that the operation is correct.

 

GOOD, to allow Centreon to remotely execute that command, in the 'nsclient.ini configuration file’ We will register the alias and the script that will execute, leaving something like:

[SourceCode][/settings/external scripts/scripts]
check_veeam_copia_agente = cmd /c echo scripts\check_veeam_endpoint_eventlogs.ps1; exit($lastexitcode) | powershell.exe -command –

[/settings/external scripts/alias]
check_veeam_copia_agente = check_veeam_copia_agente[/SourceCode]

 

We restart the NSClient++ service on the computer so that it reads the new configuration and we have the computer ready!

 

From Centreon, It's best to create a command similar to the check_nrpe, and duplicate it from “Configuration” > “Commands”. We indicate a name and that it is a check type, on the 'Command Line’ We'll put something like:

[SourceCode]$USER$1/check_nrpe -H $ARG$1 -t 30 -c check_veeam_copia_agente[/SourceCode]

 

The idea is not to have to register each computer with the Agent as if it were a different host, that doesn't interest 😉 me What is intended is that I will create as many Agent Monitoring Services as I have computers, but I'll link them to the Veeam server directly. So when you create the, I'll use an argument that will be the IP address or hostname of the computer to be checked.

 

 

What I said, since “Configuration” > “Services”, we'll duplicate any services that already have the Veeam copy host, or if we don't believe it again, go, with the following information:

  • Description: It will be the name of the service, something like Veeam Agent NOMBRE_EQUIPO sure works for us!
  • Linked with Hosts: We link here to the Veeam Machine Host, Simply by having it all together in this machine.
  • Template: We associate a parent template to inherit certain configurations.
  • Check Command: It will be here where we will select the Command that we have created in the previous step.
  • Arguments: Having selected the previous Command, it will ask us for the argument to indicate what the name of the machine is with the Agent.

 

We save the Service and create as many services as there are machines with the Veeam Backup and Replication Agent we want to monitor! Recorded, we export and also reset the configuration in Centreon to see how it looks…

 

List!! If we refresh the view of what we have monitored, we will be able to see the Services that our remote computers will check and we will be sure if the copy is made or not made 😉. This other document that you may be interested in, you can see how to monitor any Veeam backup or replica job. I hope you found it interesting!

 

Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!

Installing Nextcloud Talk

25 de October de 2018