Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Custom Agent counters not working

Custom Agent counters not working

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 17.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    K
    kghammond
    wrote on last edited by
    #1

    Below is a list of custom counters I have created.  When I copy the updated nxagentd.conf to a node, the first four counters are availble, but none of the rest show up in the NetXMS Console Data Collection List.

    *WinPerf
    Counter = UserProcess.SQLServer.CPU:"\Process(sqlservr)\% Processor Time":60:A:INT:Average % CPU Time for sqlservr.exe over past minute
    Counter = UserProcess.SQLServer.IO.ReadBytes:"\Process(sqlservr)\IO Read Bytes/sec":60:A:INT:Average I/O Read Bytes for sqlservr.exe over past minute
    Counter = UserProcess.SQLServer.IO.WriteBytes:"\Process(sqlservr)\IO Write Bytes/sec":60:A:INT:Average I/O Write Bytes for sqlservr.exe over past minute
    Counter = UserProcess.SQLServer.IO.OtherBytes:"\Process(sqlservr)\IO Other Bytes/sec":60:A:INT:Average I/O Other Bytes for sqlservr.exe over past minute
    Counter = UserProcess.SQLServer.Memory:"Process(sqlservr)\Working Set":60:A:INT:Average Memory usage for sqlservr.exe over past minute
    Counter = System.IO.DiskReadTime:"LogicalDisk(C:)\%Disk Read Time":60:A:INT:Average Disk Read Time C:
    Counter = System.IO.DiskWriteTime:"LogicalDisk(C:)\%Disk Write Time":60:A:INT:Average Disk Write Time C:
    Counter = System.IO.DiskReadBytes:"LogicalDisk(C:)\Disk Read Bytes/sec":60:A:INT:Average Disk Read Bytes Per Sec C:
    Counter = System.IO.DiskWriteBytes:"LogicalDisk(C:)\Disk Write Bytes/sec":60:A:INT:Average Disk Write Bytes Per Sec C:
    Counter = System.IO.DiskReadTime:"LogicalDisk(D:)\%Disk Read Time":60:A:INT:Average Disk Read Time D:
    Counter = System.IO.DiskWriteTime:"LogicalDisk(D:)\%Disk Write Time":60:A:INT:Average Disk Write Time D:
    Counter = System.IO.DiskReadBytes:"LogicalDisk(D:)\Disk Read Bytes/sec":60:A:INT:Average Disk Read Bytes Per Sec D:
    Counter = System.IO.DiskWriteBytes:"LogicalDisk(D:)\Disk Write Bytes/sec":60:A:INT:Average Disk Write Bytes Per Sec D:
    

    I suspect the colon behind the drive letters are creating the problems.  I have gone over this a few tims, but I can't seemt to find any other misspellings or syntax errors.  Can you find anything wrong with this list?  I am getting two errors in the event log.  One is:

    CheckCounter: PDH Error C0000BC0 in call to PdhAddCounter (Unable to parse the counter path. Check the format and syntax of the specified path.)
    

    The other is:

    Unable to add counter from configuration file. Original configuration record: System.IO.DiskReadTime:"LogicalDisk(C:)\%Disk Read Time":60:A:INT:Average Disk Read Time C:
    

    Thank you for any help,
    Kevin
    Thank you,
    Kevin

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hello!

      There are various errors. First, in many counters you miss leading backslash. Also, there should be a white space between % sign and "Disk Read Time" or "Disk Write Time". And finally, you should enclose description in double quotes if you are using colon. Correct section should looks like this:

      *WinPerf
      Counter = UserProcess.SQLServer.CPU:"\Process(sqlservr)\% Processor Time":60:A:INT:Average % CPU Time for sqlservr.exe over past minute
      Counter = UserProcess.SQLServer.IO.ReadBytes:"\Process(sqlservr)\IO Read Bytes/sec":60:A:INT:Average I/O Read Bytes for sqlservr.exe over past minute
      Counter = UserProcess.SQLServer.IO.WriteBytes:"\Process(sqlservr)\IO Write Bytes/sec":60:A:INT:Average I/O Write Bytes for sqlservr.exe over past minute
      Counter = UserProcess.SQLServer.IO.OtherBytes:"\Process(sqlservr)\IO Other Bytes/sec":60:A:INT:Average I/O Other Bytes for sqlservr.exe over past minute
      Counter = UserProcess.SQLServer.Memory:"\Process(sqlservr)\Working Set":60:A:INT:Average Memory usage for sqlservr.exe over past minute
      Counter = System.IO.DiskReadTime:"\LogicalDisk(C:)\% Disk Read Time":60:A:INT:"Average Disk Read Time C:"
      Counter = System.IO.DiskWriteTime:"\LogicalDisk(C:)\% Disk Write Time":60:A:INT:"Average Disk Write Time C:"
      Counter = System.IO.DiskReadBytes:"\LogicalDisk(C:)\Disk Read Bytes/sec":60:A:INT:"Average Disk Read Bytes Per Sec C:"
      Counter = System.IO.DiskWriteBytes:"\LogicalDisk(C:)\Disk Write Bytes/sec":60:A:INT:"Average Disk Write Bytes Per Sec C:"
      Counter = System.IO.DiskReadTime:"\LogicalDisk(D:)\% Disk Read Time":60:A:INT:"Average Disk Read Time D:"
      Counter = System.IO.DiskWriteTime:"\LogicalDisk(D:)\% Disk Write Time":60:A:INT:"Average Disk Write Time D:"
      Counter = System.IO.DiskReadBytes:"\LogicalDisk(D:)\Disk Read Bytes/sec":60:A:INT:"Average Disk Read Bytes Per Sec D:"
      Counter = System.IO.DiskWriteBytes:"\LogicalDisk(D:)\Disk Write Bytes/sec":60:A:INT:"Average Disk Write Bytes Per Sec D:"
      

      Also, you may find useful built-in parameters Process.WkSet and Process.IO.xxx. You can find short description of built-in parameters here:
      https://www.netxms.org/documentation/common_parameters.html

      However there are difference between your custom parameters and built-in Process.IO.xxx - you define average value for last minute, while built-in parameters is a totals since process start - but you can calculate an average value using delta transformation for DCI on server side.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • K
        K
        kghammond
        wrote on last edited by
        #3

        I was just going to ask that question.  I assume then that process.io.xxx with a transformation will actually be more accurate.

        At the same time, my working set counter will be more accurate than process.wkset because it will be averaged over 60 seconds.  Is that correct?

        A future request would be to document the built-in counters with the details of how the data is obtained, 60 sec avearged, total, etc.

        Thank you,
        Kevin

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          @kghammond said in Custom Agent counters not working:

          I was just going to ask that question.  I assume then that process.io.xxx with a transformation will actually be more accurate.

          They should be the same - in both cases you get average value for 60 second, the only difference is that for built-in counters you have calculation on server side (so using fewer cpu cycles on machine with agent) and that you can easily use them in templates without any changes in appropriate agent configs.

          @kghammond said in Custom Agent counters not working:

          At the same time, my working set counter will be more accurate than process.wkset because it will be averaged over 60 seconds.  Is that correct?

          Yes, that's correct.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • K
            K
            kghammond
            wrote on last edited by
            #5

            I just experimented with using process.io.xxx with a transformation of "Average delta per second", and I compared it to the:
            Counter = UserProcess.SQLServer.IO.xxx:"\Process(sqlservr)\IO xxx Bytes/sec":60:A:INT:"Average I/O xxx Bytes for sqlservr.exe over past minute"

            Both graphs are virtually identical.

            I thought this might be helpful if anyone is reading this thread.

            Kevin

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups