I am new to PRTG and would like to monitor the battery life of multiple laptops across our network.
Have conducted a search on these forums but haven't found anything useful yet.
The idea behind this is so that we can monitor the battery life of our remote laptops. These laptop users don't have ready access to a power source so if we can see when the battery life drops below a certain point. We implement a plan to replace the laptops before they run out to minimise downtime.
I imagine I will have to find a suitable WMI to monitor? Maybe Win32_Battery?
Article Comments
Hi Florian,
Thank you kindly for your response.
I'l start researching all of the information you provided me with and go from there.
Cheers,
Matt
Mar, 2019 - Permalink
Hi Matt,
Small addition to what Florian is referring to with ".... create a PowerShell script that will be executed in intervals via Task Scheduler on the laptop (hidden execution) and tries to reach your PRTG installation to inject the current data...., the listening part would be an HTTP Push sensor then on PRTG's end. See here for more details.
Kind regards,
Erhard
Mar, 2019 - Permalink
In case anyone else is looking for this, I just set it up and it works great.
On the probe server (This location): C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\WMI WQL scripts
Created a new wql file: GetBattery.wql
In that file paste the following: SELECT EstimatedChargeRemaining FROM Win32_Battery
New sensor type: WMI Custom
In the new sensor-
Namespace: root\CIMV2
WQL File: GetBattery.wql
May, 2019 - Permalink
Hi Mercury84,
This should be possible - did personally never try it - but have a look at this:
https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-battery
All you eventually need is to identify the information you want to see and engage PRTG with a WMI Custom (String) sensor or e.g. a PowerShell script to collect the data.
I am not aware that there are any standard sensors for this.
Keep in mind, laptops aren't static systems - they might be online/offline - I suppose you engage remote probes or something similar for this..
What I personally would do is a create a PowerShell script that either tries to find the laptop and request the WMI data to report it to PRTG with a Custom Script-Sensor or even better - have advanced HTTP sensors running that wait for incoming data, then create a PowerShell script that will be executed in intervals via Task Scheduler on the laptop (hidden execution) and tries to reach your PRTG installation to inject the current data.. this still needs a way to inject the target probe key information, but it might be more reliable...
Regards
Florian Rossmark
www.it-admins.com
Mar, 2019 - Permalink