Ad Widget

Collapse

memory monitoring using a txt/csv file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • advanm
    Junior Member
    • Dec 2012
    • 9

    #1

    memory monitoring using a txt/csv file

    Hi,

    I want to monitor the memory usage for a specific service.
    I can output the mem usage of that process to a txt/csv file using takslist
    [tasklist /fi 'imagename eq imagename]

    the output ot the text file looks like this
    Image Name PID Session Name Session# Mem Usage
    ========================= =====================
    SomeserviceHost.exe 2368 Services 0 267,484 K

    How can i creat a trigger to read this memory usage using the zabbix agent?
    PS we are using zabbix 1.8
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    You want to trigger to the specific value ? Try to parse it to get the correct value in Numeric format and send it using zabbix_sender utility.



    Regards,
    Alex!

    Comment

    • advanm
      Junior Member
      • Dec 2012
      • 9

      #3
      Hi,

      thanks voor your reply but how can i parse this text to get only the memory value left?

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        I'm not a Windows/Powershell guru, but in Linux you can perform this with tools like grep, head, awk Try to search for something similar so you just push the vlaue like 412412 to Zabbix

        Regards,
        Alex!

        Comment

        • advanm
          Junior Member
          • Dec 2012
          • 9

          #5
          Hi,

          I managed to get the output to a csv file, how can i read this in the zabbix agent

          the output looks like this
          (PDH-CSV 4.0) (W. Europe Daylight Time)(-120),"\\TWPL\Process G2WindmillServiceHost)\Working Set - Private"
          10/25/2017 16:02:46.757,"199344128"

          Comment

          • allexpetrov
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2017
            • 361

            #6
            Hello advanm,

            You need to use the Zabbix Sender utility and the Zabbix Trapper. You need to have a script which will cut everything off and will ask zabbix_sender to send the numerical value to server.

            Code:
            zabbix_sender -z <server> -s <host> -k memusage -o $VALUE
            Regards,
            Alex!

            Comment

            Working...