Ad Widget

Collapse

Flagging Processes larger than X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kfr
    Junior Member
    • May 2008
    • 6

    #1

    Flagging Processes larger than X

    We run multiple SUN Ray Servers and from time to time, some processes tend to grow large over time.

    I'm new to zabbix and i'm wondering if it's possible to flag processes larger than x pages.

    EG: The ps/nawk command shows the process greater than 300,000k

    ps -aef -o vsz,pid,user,args| nawk 'BEGIN {}{if ($1 > 300000) {printf ("%s %s %s %s\n",$1,$2,$3,$4); }}END{}'
    VSZ PID USER COMMAND
    314744 3981 kfr /usr/local/firefox/firefox-bin
    Last edited by kfr; 26-05-2008, 18:29.
  • cstackpole
    Senior Member
    Zabbix Certified Specialist
    • Oct 2006
    • 225

    #2
    While I don't have any experiance with your question directly, I will say this: If you can see an output, then Zabbix can be used to monitor it.

    You can write a script to check every x time interval and then send the results to Zabbix via a trapper.

    Or you can set up a User Parameter (take a look in the manual) and configure a specific item.

    Hope that helps you get started!
    Have fun!

    Comment

    • kfr
      Junior Member
      • May 2008
      • 6

      #3
      cstackpole,

      Thanks for pointing me in the right direction.

      I setup
      UserParameter=chk.vsz,ps -aef -o vsz,pid,user,args| nawk 'BEGIN {}{if ($1 > 300000) {printf ("%s %s %s %s\n",$1,$2,$3,$4); }}END{}'|grep -v VSZ|sort -n

      I was able to test with:
      zabbix_get -s testsrv -k chk.vsz
      304800 9888 kfr /usr/local/firefox-3.0rc1/firefox-bin
      383140 2730 brentmc /usr/openwin/bin/Xsun
      407032 6737 daniel /usr/local/firefox-3.0rc1/firefox-bin

      I setup the item
      Name: Processes Using a Large Amount of Memory
      Key: chk.vsz
      Type of information: Text
      Applications: Processes

      I just need to figure out the proper trigger (N is confusing me) and then setup an action and I'll be all done!

      Comment

      • cstackpole
        Senior Member
        Zabbix Certified Specialist
        • Oct 2006
        • 225

        #4
        Sorry for the long delay; I was on vacation.

        Did you get this to work? Are you having any problems with it?

        Comment

        • kfr
          Junior Member
          • May 2008
          • 6

          #5
          Originally posted by cstackpole
          Sorry for the long delay; I was on vacation.

          Did you get this to work? Are you having any problems with it?
          I can't seem to get the proper trigger syntax. I have read the docs but i'm confused as to which syntax to use.

          I've defined the field as text since it's sometimes multiple lines. eg:
          304800 9888 kfr /usr/local/firefox-3.0rc1/firefox-bin
          383140 2730 brentmc /usr/openwin/bin/Xsun
          407032 6737 daniel /usr/local/firefox-3.0rc1/firefox-bin
          Last edited by kfr; 04-06-2008, 18:19.

          Comment

          • cstackpole
            Senior Member
            Zabbix Certified Specialist
            • Oct 2006
            • 225

            #6
            Hrrm. Yeah I think I see what you mean.

            I personally would test out the .diff option for the trigger. Kind of like how the hostname is configured in the templates. The more I think about it, I would actually configure it just like that and see how it works. If I understand you right in what you want to do, that should work.

            Have fun!

            Comment

            • kfr
              Junior Member
              • May 2008
              • 6

              #7
              I managed to get the trigger working like you suggested.

              I have another question though.

              I setup a new userparameter to monitor system temperature

              The output of the userparameter is:
              mb_p0_t_core 58
              mb_t_enc 22

              The above shows the processor 0 temperature as 57 celcius and the motherboard temperature as 22. It's possible that, on some servers, there are more than 1 cpu.

              I'm able to see a "History" of the userparameter if I set the type of information as text.

              How can I get that data into a single graph, with separate entries for each processor(s) and motherboard temperature sensor?
              Last edited by kfr; 19-06-2008, 23:03.

              Comment

              • tighep
                Senior Member
                • Dec 2007
                • 124

                #8
                I would probably modify the user paramater to take a variable for each processor, or the motherboard and return just the value of that particular temperature. This will allow the type not to be text, and will make monitoring and graphing each individual piece easier. I have done a similar task for monitoring our tape drives with Tivoli Storage Manager, and created individual items for each drive, this allows me to easily monitor each drive individually.

                Comment

                Working...