New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Can I use a generic meta-scan for any sensor type?

Votes:

0

Your Vote:

Up

Down

There are many sensor types in PRTG which scan for available monitoring items during sensor creation, the “meta-scan”. I would like to know if it is possible to perform such meta-scans for other sensor types, too?

For example, can I create a device template that adds several HTTP sensors for different URLs using meta-scans?

advanced auto-discovery device-template howto meta-scan prtg

Created on Aug 19, 2016 10:56:21 AM by  Gerald Schoch [Paessler Support]



10 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 16.x.26 or later

Creating a Meta-Scan for Any Sensor Type

PRTG provides the possibility to create your own meta-scan for any sensor type you want. This generic meta-scan functionality allows advanced users to write an individual meta-scan without the need to edit the code of the sensor itself. HTTP sensors, for example, do not have a meta-scan functionality, but if you create a meta-scan for them, you can automatically add various HTTP sensors with different target URLs using the PRTG Auto-Discovery.


Note: We recommend that you use this feature only if you are an advanced PRTG user with knowledge about scripting and device templates.

The generic meta-scan is not officially supported.


To use the generic meta-scan for a specific sensor type, you need to create the following objects.

1) Executable File

You need to write an executable file (for example, an .exe, .ps1, or .bat file) that defines what to monitor. Save this executable into the \Custom Sensors\EXEXML subfolder of your PRTG installation path, for example, as mysensor.exe.

The output of this program has to be valid XML, in this format: <?xml version="1.0" encoding="UTF-8"?> <prtg> <item> <sub-item-1>x1</sub-item-1> <sub-item-2>x2</sub-item-2> [more sub-items] </item> <item> <sub-item-1>y1</sub-item-1> <sub-item-2>y2</sub-item-2> [more sub-items] </item> [more items] </prtg>

PRTG will add one sensor for each <item> element within the <prtg> section. The <item> sections define the properties of each sensor, for example, the sensor name. PRTG will copy all these sub-items into fields of the PRTG configuration file, using the same sub-item names.

To find the correct names of the config fields to use them for the sub-items, manually add a sensor of the type you want to use in the meta-scan and export it into a device template:

  • Create a device template with the desired sensor and exclude all other sensors from it.
  • Open this template with an editor. You can find it in the \devicetemplates subfolder of your PRTG program directory.
  • See section <createdata> in the template. Here you can find the names (for example, <httpurl>) of all available parameters that you can use as sub-items in your executable for the meta-scan.

Note: This is not possible for sensors which cannot be saved into device templates (see the manual for a list of exceptions) and sensor types that dynamically scan for available monitoring items when you add the sensor. As an alternative you can use a web developer tool (for example, Firebug) on the settings page of the desired sensor and find the field name this way. Note that the field names are followed by an underscore (_) that you have to leave out in the return code of your executable.

Here is an example for such a sub-item in the XML output:

<httpurl>http://paessler.com</httpurl>

2) Device Template

When you have written your program that returns the XML output in the expected format, you will need to create a device template that attaches the generic meta-scan to your sensor. This template has to execute your meta-scan executable file from above, for example, mysensor.exe.

The device template has to look like this:

<?xml version="1.0" encoding="UTF-8"?> <devicetemplate id="generic_meta" name="My Generic Meta Scan" priority="1"> <check id="ping" meta="ping"/> <create id="my_id" kind="http" meta="customexexmlgeneric" requires="ping"> <metadata> <exefile>mysensor.exe</exefile> <exeparams/> </metadata> </create> </devicetemplate>

Adjust this template to your needs:

  • Replace my_id with a unique ID.
  • kind defines the sensor type that the template will add. In this case it is http for HTTP sensors. You can find the kind of any sensor type in a device template that contains this sensor type.
  • mysensor.exe is your executable that returns an XML which is used to create your sensors with a meta-scan.
  • Save your template into the \devicetemplates subfolder of your PRTG installation.

You can now run an auto-discovery in PRTG using the template which executes your meta-scan program. See below for an example with HTTP sensors.


Example: Generic Meta-Scan for HTTP Sensors

HTTP sensors, for example, do not provide a meta-scan functionality. If you want to monitor specific websites, you would have to add each HTTP sensor with the particular target address manually. Using the generic meta-scan, you can write a program that retrieves target URLs and returns them in the expected XML format to PRTG, telling your device template which websites are to monitor. Then you can run an auto-discovery with this template and PRTG will add all HTTP sensors for each address automatically.

The device template you can use for HTTP sensors and necessary adjustments are described above. Only if you want to implement a generic meta-scan for other sensors, you will have to change the sensor “kind” in the provided template.

Now write your program that retrieves (for example, from a CSV data file) and returns a list of webpages which you want to monitor. For the XML output of the program, you need to define the items for the sensor. You can look up available items in an existing device template, as described above.

The output of your program can look like this, for example:

<?xml version="1.0" encoding="UTF-8"?> <prtg> <item> <name>Http Paessler</name> <httpurl>http://paessler.com</httpurl> </item> <item> <name>Http Google</name> <httpurl>http://google.com</httpurl> </item> </prtg>

Here is an example (snippet) for a template with an HTTP sensor that queries paessler.com. To find available items look for the content of <createdata>:

<?xml version="1.0" encoding="UTF-8"?> <devicetemplate id="custom" name="httppaessler" priority="1"> <check id="ping" meta="ping"/> <create displayname="Paessler" id="{D71DDFE5-3C02-4DCB-ADEB-102662580D64}" kind="http" requires="ping"> <createdata> <timeout>60</timeout> <tags>httpsensor</tags> <priority>3</priority> <comments/> <primarychannel>0</primarychannel> <position>10</position> <inherittriggers> <flags> <inherited/> </flags> <cell>1</cell> </inherittriggers> <stack>0</stack> <httpurl>http://paessler.com</httpurl> <httpmethod>GET</httpmethod> <httpauthneeded/> <httpuser/> <httppassword/> <httpauthentication/> <proxy> <flags> <inherited/> </flags> </proxy> <proxyport> <flags> <inherited/> </flags> <cell>8080</cell> </proxyport> <proxyuser> <flags> <inherited/> </flags> </proxyuser> <proxypassword> <flags> <encrypted/> <inherited/> <empty/> </flags> </proxypassword> <cookies/> <postdata/> <sslmethod/> <cookies/> <writeresult/> <includemusttype/> <includemaynottype/> <useuseragent/> <useragent/> </createdata> ... <triggerdata/> </create> </devicetemplate>

A PowerShell script that retrieves sensor names and target URLs and returns the according XML output to PRTG can look like this:

#Executable for Auto-Discovery via Generic Meta-Scan Device Template (http)
$path = "c:\temp\myurls.csv"
$csv = Import-csv -path $path

echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<prtg>'

foreach($line in $csv) 
{
		[string]$myName = [string]$line.Name.ToString()
		[string]$myHttpurl = [string]$line.Httpurl.ToString()

echo	'<item>'
echo		"<name>$myName</name>"
echo		"<httpurl>$myHttpurl</httpurl>"
echo	'</item>'
}
echo '</prtg>'

If you run an auto-discovery now with your device template (My Generic Meta Scan in this example) that executes your generic meta-scan executable (mysensor.exe in this example), PRTG will create two new HTTP sensors:

  1. An HTTP sensor named Http Paessler that monitors the URL http://paessler.com
  2. An HTTP sensor named Http Google that monitors the URL http://google.com

See Also

Created on Aug 19, 2016 11:12:37 AM by  Gerald Schoch [Paessler Support]

Last change on Aug 7, 2018 2:02:08 PM by  Martina Wittmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

thanks for the explanation, it's a very useful feature, i'm very happy for it!

i'm trying to use a custom meta scan to create Custom Performance Counter Sensors (PerfCounter Custom) but having the following issue with it: the sensors get created, but only the first channel is used, only the first counter finds its way into the sensor. I'm using the same syntax as in exported templates when i manually created a PerfCounter Custom Sensor using multiple Counters (&#x0d; as delimiter between counters) as you can see in the meta scan result below. the other counters are not visible in the sensor settings. the order of counter doesn't seem to matter, it's always the first counter which is used, the others are ignored. when i output an actual "Carriage Return" in the XML, all counters are visible in the sensor settings but it doesn't work. errors about can't connect to performance counter or buffer errors appear.

the custom meta scan script returns the following XML: <?xml version="1.0" encoding="UTF-8"?><prtg> <item><name>MSSQL: Performance (ADUNA)</name><counters>\MSSQL$ADUNA:General Statistics\User Connections&#x0d;\MSSQL$ADUNA:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$ADUNA:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$ADUNA:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$ADUNA:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$ADUNA:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$ADUNA:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$ADUNA:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (VEEAM)</name><counters>\MSSQL$VEEAM:General Statistics\User Connections&#x0d;\MSSQL$VEEAM:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$VEEAM:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$VEEAM:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$VEEAM:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$VEEAM:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$VEEAM:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$VEEAM:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (ACAG)</name><counters>\MSSQL$ACAG:General Statistics\User Connections&#x0d;\MSSQL$ACAG:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$ACAG:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$ACAG:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$ACAG:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$ACAG:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$ACAG:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$ACAG:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (LIME)</name><counters>\MSSQL$LIME:General Statistics\User Connections&#x0d;\MSSQL$LIME:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$LIME:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$LIME:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$LIME:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$LIME:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$LIME:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$LIME:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> </prtg>

Here is the corresponding part in the template file: <create id="mssqlpccustomsensor" kind="pccustom" meta="customexexmlgeneric" requires="ping"> <metadata> <exefile> MSSQLStatus.ps1 </exefile> <exeparams> %host %windowsdomain %windowsuser %windowspassword -MetaScan </exeparams> </metadata> <createdata/> </create>

how do i get multiple counters in perfcounter custom sensors created using a custom meta scan?

thanks for your help on this, this would make our templates even more awesome!

Created on Aug 29, 2017 8:43:46 AM by  pit (0)



Votes:

0

Your Vote:

Up

Down

Hi Pit,

Could you elaborate the carriage return? Where do you put it, what does it change about the output?


Kind regards,
Stephan Linke,Tech Support Team

Created on Aug 29, 2017 10:14:54 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

when using carriage returns the xml output would look something like this: <?xml version="1.0" encoding="UTF-8"?><prtg> <item><name>MSSQL: Performance (ADUNA)</name><counters> \MSSQL$ADUNA:General Statistics\User Connections \MSSQL$ADUNA:SQL Statistics\Batch Requests/sec \MSSQL$ADUNA:Databases(_total)\Log Flushes/sec \MSSQL$ADUNA:Buffer Manager\Lazy Writes/sec \MSSQL$ADUNA:Buffer Manager\Buffer cache hit ratio::% \MSSQL$ADUNA:Memory Manager\SQL Cache Memory (KB)::KB \MSSQL$ADUNA:Memory Manager\Total Server Memory (KB)::KB \MSSQL$ADUNA:Memory Manager\Target Server Memory (KB)::KB</counters> <tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags> </item> <item><name>MSSQL: Performance (VEEAM)</name><counters> \MSSQL$VEEAM:General Statistics\User Connections \MSSQL$VEEAM:SQL Statistics\Batch Requests/sec \MSSQL$VEEAM:Databases(_total)\Log Flushes/sec \MSSQL$VEEAM:Buffer Manager\Lazy Writes/sec \MSSQL$VEEAM:Buffer Manager\Buffer cache hit ratio::% \MSSQL$VEEAM:Memory Manager\SQL Cache Memory (KB)::KB \MSSQL$VEEAM:Memory Manager\Total Server Memory (KB)::KB \MSSQL$VEEAM:Memory Manager\Target Server Memory (KB)::KB</counters> <tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags> </item> <item><name>MSSQL: Performance (ACAG)</name><counters> \MSSQL$ACAG:General Statistics\User Connections \MSSQL$ACAG:SQL Statistics\Batch Requests/sec \MSSQL$ACAG:Databases(_total)\Log Flushes/sec \MSSQL$ACAG:Buffer Manager\Lazy Writes/sec \MSSQL$ACAG:Buffer Manager\Buffer cache hit ratio::% \MSSQL$ACAG:Memory Manager\SQL Cache Memory (KB)::KB \MSSQL$ACAG:Memory Manager\Total Server Memory (KB)::KB \MSSQL$ACAG:Memory Manager\Target Server Memory (KB)::KB</counters> <tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags> </item> <item><name>MSSQL: Performance (LIME)</name><counters> \MSSQL$LIME:General Statistics\User Connections \MSSQL$LIME:SQL Statistics\Batch Requests/sec \MSSQL$LIME:Databases(_total)\Log Flushes/sec \MSSQL$LIME:Buffer Manager\Lazy Writes/sec \MSSQL$LIME:Buffer Manager\Buffer cache hit ratio::% \MSSQL$LIME:Memory Manager\SQL Cache Memory (KB)::KB \MSSQL$LIME:Memory Manager\Total Server Memory (KB)::KB \MSSQL$LIME:Memory Manager\Target Server Memory (KB)::KB</counters> <tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags> </item> </prtg>

Notice, instead of the XML Code for Carriage Return(&#x0d;) to seperate the counters it actually puts them in multiple lines. this is the way to insert them in the sensor settings when created manually, but when i create a device template from it, the new lines get replaced by the XML Code, that's why i used the same syntax for the meta scan result.

how does the meta scan output has to look like to create PerfCounter Custom Sensors with multiple Counters?

Created on Aug 29, 2017 10:32:15 AM by  pit (0)



Votes:

0

Your Vote:

Up

Down

Why not use `r`n (native PowerShell carriage return) instead?

Created on Aug 29, 2017 11:14:13 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

that's what i did, sorry for the confusion. using `r`n creates the output mentioned before, every counter is on a seperate line.

it's probably wrong this way tough as i receive errors in the sensor. And the device template created from it looks different then when i create the sensors manually.

in the template:

  • with manually created sensors i see the xml codes seperating the counters (&#x0d;)
  • with my meta scan created sensors the counters are seperated by a space( ), which obviously won't work

the example i showed first: <?xml version="1.0" encoding="UTF-8"?><prtg> <item><name>MSSQL: Performance (ADUNA)</name><counters>\MSSQL$ADUNA:General Statistics\User Connections&#x0d;\MSSQL$ADUNA:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$ADUNA:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$ADUNA:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$ADUNA:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$ADUNA:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$ADUNA:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$ADUNA:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (VEEAM)</name><counters>\MSSQL$VEEAM:General Statistics\User Connections&#x0d;\MSSQL$VEEAM:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$VEEAM:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$VEEAM:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$VEEAM:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$VEEAM:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$VEEAM:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$VEEAM:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (ACAG)</name><counters>\MSSQL$ACAG:General Statistics\User Connections&#x0d;\MSSQL$ACAG:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$ACAG:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$ACAG:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$ACAG:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$ACAG:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$ACAG:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$ACAG:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (LIME)</name><counters>\MSSQL$LIME:General Statistics\User Connections&#x0d;\MSSQL$LIME:SQL Statistics\Batch Requests/sec&#x0d;\MSSQL$LIME:Databases(_total)\Log Flushes/sec&#x0d;\MSSQL$LIME:Buffer Manager\Lazy Writes/sec&#x0d;\MSSQL$LIME:Buffer Manager\Buffer cache hit ratio::%&#x0d;\MSSQL$LIME:Memory Manager\SQL Cache Memory (KB)::KB&#x0d;\MSSQL$LIME:Memory Manager\Total Server Memory (KB)::KB&#x0d;\MSSQL$LIME:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> </prtg>

when i put the <counters> section in a template it works, but not with the meta scan, it seems like the issue is PRTG not interpreting the <counters> section correctly or what i see is not what PRTG actually receives. is there a way to debug this? or do you have an example that works for you?

many thanks for your support

Created on Aug 29, 2017 12:28:46 PM by  pit (0)



Votes:

0

Your Vote:

Up

Down

Could you try using &#13;&#10; for the line breaks?


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 30, 2017 9:19:38 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This is how the meta scan output looks like right now, using your suggestion: <?xml version="1.0" encoding="UTF-8"?><prtg> <item><name>MSSQL: Performance (ADUNA)</name><counters>\MSSQL$ADUNA:General Statistics\User Connections&#13;&#10;\MSSQL$ADUNA:SQL Statistics\Batch Requests/sec&#13;&#10;\MSSQL$ADUNA:Databases(_total)\Log Flushes/sec&#13;&#10;\MSSQL$ADUNA:Buffer Manager\Lazy Writes/sec&#13;&#10;\MSSQL$ADUNA:Buffer Manager\Buffer cache hit ratio::%&#13;&#10;\MSSQL$ADUNA:Memory Manager\SQL Cache Memory (KB)::KB&#13;&#10;\MSSQL$ADUNA:Memory Manager\Total Server Memory (KB)::KB&#13;&#10;\MSSQL$ADUNA:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (VEEAM)</name><counters>\MSSQL$VEEAM:General Statistics\User Connections&#13;&#10;\MSSQL$VEEAM:SQL Statistics\Batch Requests/sec&#13;&#10;\MSSQL$VEEAM:Databases(_total)\Log Flushes/sec&#13;&#10;\MSSQL$VEEAM:Buffer Manager\Lazy Writes/sec&#13;&#10;\MSSQL$VEEAM:Buffer Manager\Buffer cache hit ratio::%&#13;&#10;\MSSQL$VEEAM:Memory Manager\SQL Cache Memory (KB)::KB&#13;&#10;\MSSQL$VEEAM:Memory Manager\Total Server Memory (KB)::KB&#13;&#10;\MSSQL$VEEAM:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (ACAG)</name><counters>\MSSQL$ACAG:General Statistics\User Connections&#13;&#10;\MSSQL$ACAG:SQL Statistics\Batch Requests/sec&#13;&#10;\MSSQL$ACAG:Databases(_total)\Log Flushes/sec&#13;&#10;\MSSQL$ACAG:Buffer Manager\Lazy Writes/sec&#13;&#10;\MSSQL$ACAG:Buffer Manager\Buffer cache hit ratio::%&#13;&#10;\MSSQL$ACAG:Memory Manager\SQL Cache Memory (KB)::KB&#13;&#10;\MSSQL$ACAG:Memory Manager\Total Server Memory (KB)::KB&#13;&#10;\MSSQL$ACAG:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> <item><name>MSSQL: Performance (LIME)</name><counters>\MSSQL$LIME:General Statistics\User Connections&#13;&#10;\MSSQL$LIME:SQL Statistics\Batch Requests/sec&#13;&#10;\MSSQL$LIME:Databases(_total)\Log Flushes/sec&#13;&#10;\MSSQL$LIME:Buffer Manager\Lazy Writes/sec&#13;&#10;\MSSQL$LIME:Buffer Manager\Buffer cache hit ratio::%&#13;&#10;\MSSQL$LIME:Memory Manager\SQL Cache Memory (KB)::KB&#13;&#10;\MSSQL$LIME:Memory Manager\Total Server Memory (KB)::KB&#13;&#10;\MSSQL$LIME:Memory Manager\Target Server Memory (KB)::KB</counters><tags>performancecounter performancecountercustom _tMSSQLServer _sMSSQLPerformance</tags></item> </prtg>

In the Sensor Settings i see the "list of counters" displayed as follows \MSSQL$ACAG:General Statistics\User Connections&#13;&#10;\MSSQL$ACAG:SQL Statistics\Batch Requests/sec&#13;&#10;\MSSQL$ACAG:Databases(_total)\Log Flushes/sec&#13;&#10;\MSSQL$ACAG:Buffer Manager\Lazy Writes/sec&#13;&#10;\MSSQL$ACAG:Buffer Manager\Buffer cache hit ratio::%&#13;&#10;\MSSQL$ACAG:Memory Manager\SQL Cache Memory (KB)::KB&#13;&#10;\MSSQL$ACAG:Memory Manager\Total Server Memory (KB)::KB&#13;&#10;\MSSQL$ACAG:Memory Manager\Target Server Memory (KB)::KB

seems like it does not interpret the codes as seperators, it's just one long string and the sensor fails with: There is more data to return than would fit in the supplied buffer. Allocate a larger buffer and call the function again. (Performance Counter error 0x800007D2)

thanks for your answer, do you have any other ideas?

Created on Sep 12, 2017 1:59:56 PM by  pit (0)



Votes:

0

Your Vote:

Up

Down

Not really :( Maybe the following approach will work for you; it reads the counters from a file (which could be generated during the metascan) and puts them into channels:


Kind regards,
Stephan Linke, Tech Support Team

Created on Sep 13, 2017 10:08:36 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

One more Example:

<?xml version="1.0" encoding="UTF-8"?>
<devicetemplate id="custom" name="Custom Memory Createdata" priority="1">
	<check id="ping" meta="ping"/>
	<check id="snmp" meta="snmp" requires="ping"/>
	<create id="snmpmemory" kind="snmpmemory" requires="snmp"displayname="Memory: Physical Memory">
		<createdata>
			<memory>Physical Memory</memory>
			<tags>snmpmemorysensor memory memorysensor snmp</tags>
			<priority>3</priority>
			<comments/>
			<primarychannel>0</primarychannel>
			<position>10</position>
			<inherittriggers>
				<flags>
					<inherited/>
				</flags>
				<cell>1</cell>
			</inherittriggers>
			<stack>0</stack>
			<usesingleget/>
		</createdata>
		<triggerdata/>
	</create>
</devicetemplate>

This template will deploy the SNMP Memory Sensor but instead of deploying sensors both for Memory: Physical Memory and Memory: Virtual Memory it will only create the sensor for Memory: Physical Memory.

Created on Oct 10, 2017 9:20:53 AM by  Luciano Lingnau [Paessler Support]



Please log in or register to enter your reply.


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.