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

Integrate TYPEPERF into a sensor

Votes:

0

I have a CMD file that checks the contents of a PerfMon counter. Any chance that PRTG will incorporate the use of TYPEPERF as a sensor? This would help on those pesky servers that don't want to provide a value via WMI or WQL.

Here's the cmd file contents:

::	GetASPSessions.cmd\\
::	Remote PerfMon Query of ASP Sessions count\\
::	expects a parameter passed, which is the servername\\
::	SYNTAX = GetASPSessions.cmd servername\\
\\
::	Set environment\\
@echo off\\
set COMP=%1\\
\\
::	Check parameter\\
IF [%1]==[] (ECHO Computer name missing! && GOTO:EOF)\\
\\
::	Skip to 2nd line of TYPEPERF output and dump just the value\\
for /f "skip=1 tokens=3 delims=, " %%i in ('typeperf "\ASP.NET State Service\State Server Sessions Active" -sc 1 -s %COMP% ^| find ","') do (set RESULT=%%~i)\\
\\
::	force format value to integer\\
SET /A MODRESULT=RESULT\\
\\
::	Success\\
echo %MODRESULT%:Ok\\
GOTO:EOF\\

custom-sensor perfmon value

Created on Mar 21, 2011 7:15:03 PM

Last change on Mar 24, 2011 1:43:58 PM by  Daniel Zobel [Product Manager]



2 Replies

Votes:

0

Hello,

I don't think we are going to make a special sensor for this. You might want to check out the EXE/Script Advanced Sensor to use "typeref".

Best Regards.

Created on Mar 22, 2011 12:18:09 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Forgot to mention that I am using this as a "EXE/Script" custom sensor and the cmd file is easy enough to customize if I need to look at a different PerfMon value.

Created on Mar 22, 2011 12:30:28 PM




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.