Ad Widget

Collapse

proc.num syntax help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brad9iner
    Junior Member
    • Jan 2013
    • 2

    #1

    proc.num syntax help

    I have some application specific processes that I am needing to monitor to make sure that they are running.

    Here are the processes:
    16:36:32 # ps -ef | grep sentinel
    root 2172 1 0 2012 ? 00:00:01 /usr/cerneresm/sentinel/sentinelserver START
    root 2176 2172 0 2012 ? 05:47:21 /usr/cerneresm/sentinel/sentinelserver JMX PrimaryServer -cfg /usr/cerneresm/sentinel/sentinel.config
    root 5860 5805 0 16:36 pts/0 00:00:00 grep sentinel

    currently I have items in my template setup with the following keys:
    proc.num[sentinelserver START]
    proc.num[sentinelserver JMX]

    Which I do not think are working because they are returning a '0'. I could monitor both processes at the same time by making the key:
    proc.num[sentinelserver]

    But I am needing to have the processes monitored seperately. So my question is how can I use the proc.num key to use 2 words as the syntax of the command line?

    Thanks in advance for any help that is given.
  • Michael0
    Member
    • Jan 2013
    • 70

    #2
    Try to use this syntax, I had the same issue:

    proc.num[,,,sentinelserver START]
    proc.num[,,,sentinelserver JMX]

    Then you will use the cmdline option from the proc.num command

    Original Syntax: proc.num[<name>,<user>,<state>,<cmdline>]
    Last edited by Michael0; 09-01-2013, 13:46.

    Comment

    • brad9iner
      Junior Member
      • Jan 2013
      • 2

      #3
      Thank you for the info. That is similar to what I ended up doing.
      I realized that the command lines are identical up until the JMX and the START. So what I went ahead and did was use the 3 commas option but only used 1 word.
      For example:
      proc.num[,,,START]
      proc.num[,,,JMX]

      worked perfectly. Thank you very much for the help on that

      Comment

      • tanzi
        Junior Member
        • Apr 2018
        • 1

        #4
        Hi,

        even i want to monitor docker and mysql services on my agents and trying to use the proc_num key. it is not fetching any data. can u pls tell what am i missing here.

        proc.num[docker,run]

        i want to monitor if docker and mysql services are running or not. If not, then i want to create a action or trigger to get notified.

        Comment

        • vdbhai
          Junior Member
          • Sep 2020
          • 1

          #5
          can we put Linux command in cmdline parameter?

          e.g. proc.num[,,,ps aux | grep '[D]slname=i36']

          I tried it's not fetching values. showing 0, where am I doing mistake?

          Thanks in advance!

          Comment

          Working...