HOWTO: Monitor a Process in Linux using vRealize Operations – Endpoint Operation Management – Part 4

This is Part Four of a series on Monitoring Processes in Linux using VMware vRealize Operations Endpoint Operations Management (EPOPS).

Part 1 – Creating the MultiProcess Object for a single Linux Machine
Part 2 – Creating a MultiProcess Object for a Linux Machine (via Inventory Explorer)
Part 3 – Creating Object Relationships
Part 4 – Identifying the correct process.query string

Firstly I would highly recommend the following steps are taken within a test/lab environment. Within my lab environment I had numerous instances of core CentOS7, so if you have a more feature rich installation of Linux some of the steps may not be necessary.

I am currently using a bare bones CentOS 7 image with the vRealize Endpoint Operations Agent 6.2.x (vRealize-Endpoint-Operations-Management-Agent-x86-64-linux-6.2.0-3404388.rpm) installed with integrated Java.

My home lab has connectivity to the internet so the installation of Java 1.8 was relatively simple.  If you don’t have Java installed you can either download the offline package or just type yum install java and follow the on screen prompts (which is y twice).

Identifying the correct value for process.query

Log into CentOS (i’m using root login as its my homelab).

Type ps ax | grep <process> to show the information on the process you want to monitor.  You need to identify the PID for the process, in this instance I have chosen the sshd process and it had a PID of 1272.

sshd

Type java -jar /opt/vmware/epops-agent/bundles/agent-x86-64-linux-6.2.0/pdk/lib/sigar-1.6.6.13.jar and press enter.

At the Sigar shell type pinfo 1272 to show the information on the sshd process.sshd-01The Name field highlighted can be used within the process.query field to monitor the process using the EPOPS agent (State.Name.eq=sshd).

14 Comments

  1. dear friend
    Hi

    so thanks from your article

    i have 3 question about this :

    1 – we just want use pinfo for find the name of service?

    2 – i just have this path :

    /opt/vmware/epops-agent/bundles/agent-x86-64-linux-6.5.0/lib/

    i don’t have sigar-1.6.6.13.jar file how can download and install that offline ??

    3 – i have a server that oracle has been installed on that for start this service i have to type below commands:

    .ias.env

    opmnctl startall

    and when type opmnctl status if all of service has been show in below link

    https://ibb.co/cgUJhF

    now i want to know can i monitor this service on my linux server if ias not up show critical and …..
    now how can these in vrops ??

    BR

      1. Hi Babak,

        If you have access to sigar, you should be able to do a psinfo on the pid’s in the table to get the Name of the service to monitor. You can then use that to create a monitor in vROPs.

        Let me know if that helps

        Chris

        1. dear chris
          so thanks

          but i could not get the answer of this question

          3 – i have a server that oracle has been installed on that for start this service i have to type below commands:

          .ias.env

          opmnctl startall

          and when type opmnctl status if all of service has been show in below link

          https://ibb.co/cgUJhF

          now i want to know can i monitor this service on my linux server if ias not up show critical and …..
          now how can these in vrops ??

          BR
          Babak

          1. Babak,

            I’m not sure I can help. Oracle / Linux really isn’t my key skill set. Have you thought about using the Blue Medora management Pack for Oracle?

            Chris

  2. but i think your atricle has a problem

    when we install end point agent for linux (rpm file) this will be up a java service and now i have on my server tomcat (is java base) please see attach pic when i use pinfo for tomcat service it dtect Name=java and when use pinfo for java that will be installed by endpoint agent it detect Name=java

    both of them names are java now i want just monitor tomcat for State.Name.eq = ?????

    what do i have to write ???

  3. Babak – you need to Sigar PTQL commands/Documentation,

    PTQL queries take this form:

    Class.Attribute.operator=value

    Where:

    Class — is the name of the Sigar class minus the Proc prefix.
    Attribute — is an attribute of the given Class, index into an array or key in a Map class.
    operator — is one of the following (for String values):
    eq — Equal to value
    ne — Not Equal to value
    ew — Ends with value
    sw — Starts with value
    ct — Contains value (substring)
    re — Regular expression value matches

    Examples include:

    Pid.Pid – The process ID
    Pid.PidFile – File containing the process ID
    Pid.Service – Windows Service name used to pid from the service manager
    State.Name – Base name of the process executable
    CredName.User – User Name of the process owner
    CredName.Group – Group Name of the process owner
    Cred.Uid – User ID of the process owner
    Cred.Gid – Group ID of the process owner
    Cred.Euid – Effective User ID of the process owner
    Cred.Egid – Effective Group ID of the process owner
    Exe.Name – Full path name of the process executable
    Exe.Cwd – Current Working Directory of the process
    Args.* – Command line argument passed to the process
    Env.* – Environment variable within the process
    Modules.* – Shared library loaded within the process

    So you could use Pid.pid.eq=”

    Chris

    1. since that pid will be change with each stop/start service thus pid.pid is not usefull

      for example java service that is on my linux server has 3 node and the path of start.sh for all of them is in one place but for run each of them go to below path :
      /usr/local/jboss-4.1.1-AMLO/bin
      and type below command

      ./run.sh -c node1 ——-> this will start node1
      ./run.sh -c node2 ——–> this will start node2

      i am confused which of them can use and how ??

      BR
      Babak

      1. Hi Babak,

        You need to identify something that would make the process unique out of the list. You can have more than one attribute in the process string.

        As an example,

        State.Name.eq=java,Args.*.eq=org.jboss.Main

        would identify a process whose name is “org.jboss.Main”.

        You can link the values with a , (comma).

        Checkout http://pubs.vmware.com/hyperic-584/index.jsp#com.vmware.hyperic.resource.configuration.metrics.doc/GUID-42A9001A-EC4D-4601-A4EA-B39EFEE4A678.html?resultof=%2522%2553%2574%2561%2574%2565%252e%254e%2561%256d%2565%252e%2565%2571%253d%256a%2561%2576%2561%2522%2520

        HTH

        Chris

        1. Dear chris
          Hi

          the output of my ps-ef | grep java is :

          [root@nn ~]# ps -ef | grep java
          root 16266 1 1 Aug08 ? 00:10:22 /usr/bin/java -Djava.util.logging.config.file=/u01/apache-tomcat-8.0.18/conf/logging.properties -Djava.util.logging.man
          ager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/u01/apache-tomcat-8.0.18/endorsed -classpath /u01/apache-tomcat-8.0.18/bin/bootstrap.jar:/u01/apache-t
          omcat-8.0.18/bin/tomcat-juli.jar -Dcatalina.base=/u01/apache-tomcat-8.0.18 -Dcatalina.home=/u01/apache-tomcat-8.0.18 -Djava.io.tmpdir=/u01/apache-tomcat-8.0.18/temp or
          g.apache.catalina.startup.Bootstrap start

          now when i type :

          State.Name.eq=java,Args.*.eq=apache-tomcat

          or

          State.Name.eq=java,Args.*.eq=apache-tomcat-8.0.18

          it could not work correctly now i am realy confused what do i have to type?

          BR
          Babak

          1. Hi Babak,

            I have given you as much information as I know on how to configure the process capture in EPOps. My *nix skills are not all that in depth so I am unsure how to help you further with this.

            As suggested, you need to be able to uniquely identify the process/service you want to monitor by a number of PTQL queries that can be put together for the process.query value.

            Maybe ask of the VMTN forums and see if anyone else has had to do this?

            The more appropriate way to monitor Oracle services would be via vROps management packs that interface to Oracle Enterprise Manager. These would not be free though.

            Chris

          2. dear chris

            my problem has been solved .

            now i want to know can vrealize operation monitor a web url ??? for example if a url has been down it show in alert?

            BR

Leave a Reply