Monitor Comcast Motorola Arris Surfboard SB6141 with PRTG
30 Apr 2017I monitor my Comcast cable modem’s signal values in PRTG.
Set up Perl and get XML output from your modem
- Install Strawberry Perl on the probe machine. This adds Perl.exe into the System-wide path.
- Restart the PRTG Probe Service.
- Grab
prtg-cmstats-sb6141.pl
from https://github.com/YandereSkylar/cabletools/ and drop it intoC:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
. - Ensure you can get stats from your modem. By default, the modem is available at 192.168.100.1; you may need to add routing rules to your router to ensure you can access this. Hit http://192.168.100.1 in your browser, and then verify connectivity via
perl prtg-cmstats-sb6141.pl
from a shell on the Probe machine. You should get back a bunch of XML:
<?xml version="1.0" encoding="Windows-1252" ?>
<prtg>
<text> Up 0 days 0h:44m:3s</text>
<result>
<channel>Downstream Power Level</channel>
<customUnit>dBmV</customUnit>
<float>1</float>
<LimitMode>1</LimitMode>
<LimitMaxWarning>8</LimitMaxWarning>
<LimitMaxError>15</LimitMaxError>
<LimitMinWarning>-4</LimitMinWarning>
<LimitMinError>-15</LimitMinError>
<LimitWarningMsg>Signal level out of recommended range.</LimitWarningMsg>
<LimitErrorMsg>Signal level out of recommended range.</LimitErrorMsg>
<value>11</value>
</result>
<result>
<channel>Downstream SNR</channel>
<customUnit>dB</customUnit>
<float>1</float>
<LimitMode>1</LimitMode>
<LimitMinWarning>33</LimitMinWarning>
<LimitMinError>30</LimitMinError>
<LimitWarningMsg>Signal level out of recommended range.</LimitWarningMsg>
<LimitErrorMsg>Signal level out of recommended range.</LimitErrorMsg>
<value>37.8</value>
</result>
<result>
<channel>Upstream Power Level</channel>
<customUnit>dBmV</customUnit>
<float>1</float>
<LimitMode>1</LimitMode>
<LimitMaxWarning>50</LimitMaxWarning>
<LimitMaxError>55</LimitMaxError>
<LimitWarningMsg>Signal level out of recommended range.</LimitWarningMsg>
<LimitErrorMsg>Signal level out of recommended range.</LimitErrorMsg>
<value>42.5</value>
</result>
</prtg>
Get PRTG to Parse the XML Values
- Because PRTG only offers you the EXE if it is present in the pre-determined directory (sigh), copy Perl.exe from the Strawberry Perl installation directory (usually
C:\Strawberry\perl\bin
) intoC:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML
. - Add an EXEXML sensor, set IP address
192.168.100.1
and set EXE/Script to Perl.exe in the dropdown. - Set Parameters field to
"C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\prtg-cmstats-sb6141.pl"
(include the quotes) - Write EXE result to disk in case of error.
- Watch
%PROGRAMDATA%\Paessler\PRTG Network Monitor\Logs (Sensors)
to debug any error messages. - #profit.