What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

backup sensor for avamar backup

Votes:

0

the sensor was working fine like couple of months before.

then suddenly its giving an error. "xml parser mismatch </531>,got </prtg> -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code:PE231)

could any one please help me with this issue. am new to both prtg and scripting.

The script i am using in for the sensor.

$DEVICE=$args[0]

  1. Set Path $logpath = "
    $($DEVICE)\c$\Program Files\avs\var\clientlogs" cd $logpath
  2. Get Latest Log $logfile = gci *.log | sort LastWriteTime | select -last 1 | Select-object -Property Name
  3. Check Log $status = Select-String -Path $logfile.Name -Pattern "avtar Info <5314>:" | Foreach {$_.Line}
  4. remove unwanted chars $statusclean = $status -replace ‘[<>]’
  5. check status outcome if ($status -match "Command failed") { $result= "1" } else { $result = "0" }
  6. send to PRTG

"<prtg>" "<result>" "<channel>" "BackupStatus" "</channel>" "<value>" echo $result "</value>" "</result>" "<text>" echo "Status: $($statusclean)" "</text>" "</prtg>"

avamar powershell prtg

Created on Apr 4, 2018 2:44:46 AM



1 Reply

Votes:

0

Hello Mr-x,

As a first step, please open the settings page of the sensor in PRTG and enable the option "Write sensor result to disk (Filename: "Result of Sensor [ID].txt")". The results will be written into the log file directory of the probe, where the sensor is configured:

  • C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)

The ID of the sensor is part of the web browser URL and is also displayed on the sensor's overview page.

Best regards, Felix

Created on Apr 4, 2018 12:16:17 PM by  Felix Saure [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.