Ad Widget

Collapse

Monitoring multiple application instances per server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #16
    Originally posted by Ammaralk
    and now i have a problem with monitoring multiple instances on a single machine and i have been trying to do it for quite sometime now and until now i couldn't do it
    the database is SAP HANA
    So all what you need is find out how to generate list of names of your instances.
    Such list can be transformed to json string like in my Linux template in which out of /proc/diskstats I'm generating json string which could be used to monitor block devices.
    Example of such item:

    Code:
    system.run["awk 'BEGIN {print \"{\\"data\\":[\"; ORS=\"\"} {if (NR!=1) {print \",\n\"}; print \"{\\"{#DISK}\\":\\"\" $3 \"\\"}\"} END {print \"\n]}\"}' /proc/diskstats"]
    Sample output from command line:

    Code:
    # awk 'BEGIN {print "{\"data\":["; ORS=""} {if (NR!=1) {print ",\n"}; print "{\"{#DISK}\":\"" $3 "\"}"} END {print "\n]}"}' /proc/diskstats; echo
    {"data":[
    {"{#DISK}":"sda"},
    {"{#DISK}":"sda1"},
    {"{#DISK}":"sda2"},
    {"{#DISK}":"sdb"},
    {"{#DISK}":"sdc"}
    ]}
    This raw input list is used with filter with regexp which is removing all partitions of the devices a with set of item and graphs prototypes such list can be used to organize dynamic metrics.
    How to obtain monitoring data from you databases instances it another story.
    Nevertheless this short example shows how to organize thing within zabbix.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Ammaralk
      Junior Member
      • Aug 2017
      • 7

      #17
      Originally posted by kloczek
      So all what you need is find out how to generate list of names of your instances.
      Such list can be transformed to json string like in my Linux template in which out of /proc/diskstats I'm generating json string which could be used to monitor block devices.
      Example of such item:

      Code:
      system.run["awk 'BEGIN {print \"{\\"data\\":[\"; ORS=\"\"} {if (NR!=1) {print \",\n\"}; print \"{\\"{#DISK}\\":\\"\" $3 \"\\"}\"} END {print \"\n]}\"}' /proc/diskstats"]
      Sample output from command line:

      Code:
      # awk 'BEGIN {print "{\"data\":["; ORS=""} {if (NR!=1) {print ",\n"}; print "{\"{#DISK}\":\"" $3 "\"}"} END {print "\n]}"}' /proc/diskstats; echo
      {"data":[
      {"{#DISK}":"sda"},
      {"{#DISK}":"sda1"},
      {"{#DISK}":"sda2"},
      {"{#DISK}":"sdb"},
      {"{#DISK}":"sdc"}
      ]}
      This raw input list is used with filter with regexp which is removing all partitions of the devices a with set of item and graphs prototypes such list can be used to organize dynamic metrics.
      How to obtain monitoring data from you databases instances it another story.
      Nevertheless this short example shows how to organize thing within zabbix.
      thank you very much
      now i know where to go

      Comment

      Working...