Ad Widget

Collapse

Tomcat service monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prejithprasannan
    Junior Member
    • Jan 2020
    • 5

    #1

    Tomcat service monitoring

    Hi,
    In my server Tomcat7 and 8 versions are running. I just want to monitor both versions of tomcat are running or not. If it is not triggering any alert. What item expression is used to fulfil this task. I used
    {Hostnameroc.num[tomcat7].last()}=0as Trigger expression. Its not working. Please suggest a possible solution for Item and trigger expression for monitoring Tomcat process.
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Look at the processes in the system - most likely you will not see the Tomcat process. Make monitoring of the java process !

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by prejithprasannan
      I used
      Code:
      {Hostname:proc.num[tomcat7].last()}=0
      as Trigger expression. Its not working.
      The first argument to proc.num is the process name, the 2nd argument is the user the process is running as. If you're launching your tomcat processes via
      Code:
      jsvc.exec
      , then you probably want something like
      Code:
      {hostname:proc.num[jsvc.exec,tomcat7].last()}=0
      for your processes running as tomcat7 and
      Code:
      {hostname:proc.num[jsvc.exec,tomcat8].last()}=0
      for your processes running as user tomcat8.

      Just checking whether the process exists is a start, but it's very basic and won't tell you if tomcat is healthy. You probably want to look at web scenarios to check that you can actually get tomcat to output the expected pages

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Originally posted by Arsoy
        Hi, I have a client that has a tomcat process that occasionally dies.
        If this is running on any recent Linux system, you should consider using a systemd service script to start tomcat, rather than a traditional init script. For all of its downsides, systemd excels at the "restart this if it died" issue.

        Comment

        • prejithprasannan
          Junior Member
          • Jan 2020
          • 5

          #5
          Originally posted by tim.mooney

          The first argument to proc.num is the process name, the 2nd argument is the user the process is running as. If you're launching your tomcat processes via
          Code:
          jsvc.exec
          , then you probably want something like
          Code:
          {hostname:proc.num[jsvc.exec,tomcat7].last()}=0
          for your processes running as tomcat7 and
          Code:
          {hostname:proc.num[jsvc.exec,tomcat8].last()}=0
          for your processes running as user tomcat8.

          Just checking whether the process exists is a start, but it's very basic and won't tell you if tomcat is healthy. You probably want to look at web scenarios to check that you can actually get tomcat to output the expected pages
          This is not working.

          Incorrect item key "proc.num[jsvc.exec,tomcat7]" provided for trigger expression on "hostname"

          Comment


          • tim.mooney
            tim.mooney commented
            Editing a comment
            Did you edit the trigger without changing the item? You can't use a trigger if there's not a matching item somewhere.
        • prejithprasannan
          Junior Member
          • Jan 2020
          • 5

          #6
          Originally posted by Hamardaban
          Look at the processes in the system - most likely you will not see the Tomcat process. Make monitoring of the java process !
          This is possible in the sense of only one version of tomcat service is running on the server. If tomcat 7 and 8 are running on the same server we cannot identify that which tomcat version went down.

          Comment

          Working...