Tag Archives: prtg

Linux Docker contrainer and PRTG

Simple script to monitor that all docker container is running, and report the status back to PRTG
It return 1 if the docker is running, or else it will return 0.

#!/bin/bash
echo  "<prtg>"
#dockerlist_arr=( $(docker ps -a) )
readarray -t dockerlist_arr < <( docker ps -a | awk '{print $NF}' | tail -n +2 )
for i in "${dockerlist_arr[@]}"
do
   echo "<result>"
   echo "<channel>$i</channel>"
   if [ "$( docker container inspect -f '{{.State.Running}}' $i )" = "true" ]; then
        echo "<value>1</value>"
   else
        echo "<value>0</value>"
   fi
   echo "<LimitMode>1</LimitMode>"
   echo "<LimitMaxError>1</LimitMaxError>"
   echo "<LimitMinError>1</LimitMinError>"
   echo "</result>"
# or do whatever with individual element of the array
done
echo "</prtg>"

Passler PRTG Windows update Probe says missing updates, but none in windows update

You can run this commands to see what updates, that PRTG windows update probes is warning about.

$searcher = (New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher();$searcher.Search("Type='Software'").Updates | Sort-Object -Property Dates -Descending | ft -autosize IsInstalled, MsrcSeverity,title

Problems with running WMI Request from domain member to workgroup machine

Today, I have the problem that I could not run WMI request from a Domain join member server, to a standalone workgroup server.

It keeps telling me Access Denied.

It turn out that:
In a workgroup, the account connecting to the remote computer is a local user on that computer. Even if the account is in the Administrators group, UAC filtering means that a script runs as a standard user.

That is a good link to refer to. It is about Remote UAC and WMI. The solution is to go to the following registry key – HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System – and create a new name called LocalAccountTokenFilterPolicy (of type DWORD_32) with a value of 1. (Check the Serverfault post for one more solution if you are using a Server 2012).