{"id":25819,"date":"2023-06-15T16:39:01","date_gmt":"2023-06-15T14:39:01","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=25819"},"modified":"2024-09-11T10:18:36","modified_gmt":"2024-09-11T08:18:36","slug":"zabbix-defining-custom-monitoring-metric","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/","title":{"rendered":"Defining Custom Monitoring Metric in Zabbix"},"content":{"rendered":"\n<p>In this blog, we will see how to add custom monitoring metric into Zabbix and, more precisely, get Java Virtual Machine (JVM) garbage collector heap statics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-jstat\">jstat<\/h2>\n\n\n\n<p>OpenJDK includes an interesting tool to monitor a JVM: <code>jstat<\/code>.<\/p>\n\n\n\n<p>Let&#8217;s see what we have when running it:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ \/app\/Java\/jdk\/bin\/jstat -gc `pgrep java`\n S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT    CGC    CGCT     GCT\n 0.0   11264.0  0.0   11264.0 649216.0 252928.0  388096.0   70777.5   131840.0 119912.0 18048.0 14451.3     27    1.867   0      0.000   2      1.027    2.895\n<\/pre><\/div>\n\n\n<p>I am providing two arguments. <code>-gc<\/code> to get garbage-collected heap statistics and the JVM PID. Note that this will work only if one java process is running on the host.<\/p>\n\n\n\n<p>Each column represents a size, capacity or count:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>S0C<\/code>: Current survivor space 0 capacity (kB).<\/li>\n\n\n\n<li><code>S1C<\/code>: Current survivor space 1 capacity (kB).<\/li>\n\n\n\n<li><code>S0U<\/code>: Survivor space 0 utilization (kB).<\/li>\n\n\n\n<li><code>S1U<\/code>: Survivor space 1 utilization (kB).<\/li>\n\n\n\n<li><code>EC<\/code>: Current eden space capacity (kB).<\/li>\n\n\n\n<li><code>EU<\/code>: Eden space utilization (kB).<\/li>\n\n\n\n<li><code>OC<\/code>: Current old space capacity (kB).<\/li>\n\n\n\n<li><code>OU<\/code>: Old space utilization (kB).<\/li>\n\n\n\n<li><code>MC<\/code>: Metaspace capacity (kB).<\/li>\n\n\n\n<li><code>MU<\/code>: Metaspace utilization (kB).<\/li>\n\n\n\n<li><code>CCSC<\/code>: Compressed class space capacity (kB).<\/li>\n\n\n\n<li><code>CCSU<\/code>: Compressed class space used (kB).<\/li>\n\n\n\n<li><code>YGC<\/code>: Number of young generation garbage collection events.<\/li>\n\n\n\n<li><code>YGCT<\/code>: Young generation garbage collection time.<\/li>\n\n\n\n<li><code>FGC<\/code>: Number of full GC events.<\/li>\n\n\n\n<li><code>FGCT<\/code>: Full garbage collection time.<\/li>\n\n\n\n<li><code>GCT<\/code>: Total garbage collection time.<\/li>\n<\/ul>\n\n\n\n<p>I will not go in detail of these counters, but I will explain how to monitor them with Zabbix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-system-run\">system.run<\/h2>\n\n\n\n<p>At first, we need to define an item that will:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Run <code>jstat<\/code> command<\/li>\n\n\n\n<li>Convert result to JSON format<\/li>\n<\/ol>\n\n\n\n<p>Go on Hosts list and click on <em>Items<\/em> on a host which is running a JVM (note that could be done in a template as well):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"596\" height=\"62\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-13_49_47-zabbix_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25899\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-13_49_47-zabbix_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png 596w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-13_49_47-zabbix_-Configuration-of-hosts-\u2014-Mozilla-Firefox-300x31.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/figure>\n\n\n\n<p>Click &#8220;Create Item&#8221; and fill in the black:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set a name (ie. JVM GC stats)<\/li>\n\n\n\n<li>Add the following key: <code>system.run[sudo \/app\/Java\/jdk\/bin\/jstat -gc <\/code>`pgrep java`<code>|tr -s ' '|cut -c2-]<\/code><\/li>\n<\/ul>\n\n\n\n<p>Unfortunately, I did not find a way, natively with Zabbix (maybe you know one?) to convert this to JSON directly, so I used bash tricks. <code>tr -s ' '<\/code> will remove any repeating space and <code>cut -c2-<\/code> will remove the extra space from the beginning.<\/p>\n\n\n\n<p>And, by the way, <code>system.run<\/code> is the way to call a command on an agent.<\/p>\n\n\n\n<p>First screen looks like that:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"606\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-14_56_28-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25902\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-14_56_28-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 794w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-14_56_28-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x229.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-14_56_28-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x586.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-access-to-jstat\">Access to jstat<\/h2>\n\n\n\n<p>By default, Zabbix server is not allowed to call any commands from agent, so we must allow it in agent configuration. If not, you will have this not-so-clear error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"249\" height=\"85\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-09_55_02-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"Unknown metric system.run\" class=\"wp-image-25901\" \/><figcaption class=\"wp-element-caption\">Unknown metric system.run<\/figcaption><\/figure>\n\n\n\n<p>For obvious security reasons, all <code>system.run<\/code> are denied by default, so we must explicitly allow it. This is done by adding <code>AllowKey=system.run[sudo \/app\/Java\/jdk\/bin\/jstat*]<\/code> in <code>\/etc\/zabbix\/zabbix_agent2.conf<\/code>, followed by a service restart (<code>systemctl restart zabbix-agent2.service<\/code>).<\/p>\n\n\n\n<p>We must also allow zabbix user to run <code>sudo<\/code> as well. With <code>visudo \/etc\/sudoers<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nzabbix ALL=(ALL) NOPASSWD: \/app\/Java\/jdk\/bin\/jstat\n<\/pre><\/div>\n\n\n<p>Now, we can trigger a test by clicking <em>Test<\/em> button and <em>Get value and test<\/em> from newly opened window:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"382\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_01_02-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25904\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_01_02-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 817w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_01_02-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x140.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_01_02-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x359.png 768w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/figure>\n\n\n\n<p>As you can see, the result is there but not very easy to use. Now, we have to convert it to JSON format.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-preprocessing\">Preprocessing<\/h2>\n\n\n\n<p>To convert to JSON, we will use Preprocessing feature. After I closed Test item windows, I go in Preprocessing tab of the item. All the formatting part is done in the command, so converting to JSON is just a matter of adding one preprocessing step:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_05_51-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-1024x175.png\" alt=\"\" class=\"wp-image-25906\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_05_51-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-1024x175.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_05_51-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x51.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_05_51-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x131.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_05_51-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 1172w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Note that Parameters cell contains one space which is the column delimiter. We can also test it:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"94\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_08_53-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25907\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_08_53-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 813w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_08_53-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x35.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_08_53-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x89.png 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/figure>\n\n\n\n<p>At this time, we can see we have a JSON formatted string. To have one metric in item, we could either add another step as JSONPath to extract the metric we want of create a dependent item. I will go for option two as: It will avoid some useless (repeating) load on each item. <code>jstat<\/code> command as well as <em>CSV to JSON<\/em> parsing will be run once only per period.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-dependent-item\">Dependent item<\/h2>\n\n\n\n<p>Let&#8217;s create a new item which will be dependent from previously created item: In <em>Type<\/em>, I am selecting <strong>Dependent item<\/strong>. and then <strong>JVM GC stats<\/strong> as Master item:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"571\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_20_49-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25913\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_20_49-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 797w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_20_49-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x215.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_20_49-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x550.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/figure>\n\n\n\n<p>Name and Key are up to you.<\/p>\n\n\n\n<p>To extract the value of EU (Eden space utilization (kB)), I will use JSONPath preprocessing steps with parameter <code>$[0].EU<\/code>. <strong>0<\/strong> is the first line of the JSON array which contains anyway only one and <strong>EU<\/strong> is the column name:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"109\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_31_54-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-1024x109.png\" alt=\"\" class=\"wp-image-25918\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_31_54-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-1024x109.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_31_54-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x32.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_31_54-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x81.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_31_54-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 1169w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here it is not possible to test the item, but the preprocessing step (<em>Test all steps<\/em> button). Unfortunately, you must provide the result of the master item to be able to test it. In my case, result of master item was:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;{&quot;S0C&quot;:&quot;0.0&quot;,&quot;S1C&quot;:&quot;11264.0&quot;,&quot;S0U&quot;:&quot;0.0&quot;,&quot;S1U&quot;:&quot;11264.0&quot;,&quot;EC&quot;:&quot;649216.0&quot;,&quot;EU&quot;:&quot;159744.0&quot;,&quot;OC&quot;:&quot;388096.0&quot;,&quot;OU&quot;:&quot;70933.5&quot;,&quot;MC&quot;:&quot;131840.0&quot;,&quot;MU&quot;:&quot;119991.7&quot;,&quot;CCSC&quot;:&quot;18048.0&quot;,&quot;CCSU&quot;:&quot;14451.8&quot;,&quot;YGC&quot;:&quot;29&quot;,&quot;YGCT&quot;:&quot;2.163&quot;,&quot;FGC&quot;:&quot;0&quot;,&quot;FGCT&quot;:&quot;0.000&quot;,&quot;CGC&quot;:&quot;2&quot;,&quot;CGCT&quot;:&quot;1.027&quot;,&quot;GCT&quot;:&quot;3.191&quot;,&quot;&quot;:&quot;&quot;}]\n<\/pre><\/div>\n\n\n<p>After a click on Test, we will see the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"315\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_34_43-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-25916\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_34_43-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox.png 813w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_34_43-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-300x116.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-15_34_43-zabbix_-Configuration-of-items-\u2014-Mozilla-Firefox-768x298.png 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/figure>\n\n\n\n<p>And we can see the historical evolution of it:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"205\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox-1024x205.png\" alt=\"\" class=\"wp-image-25949\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox-1024x205.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox-300x60.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox-768x154.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox-1536x308.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/2023-06-15-16_36_50-zabbix_-History-refreshed-every-30-sec.-\u2014-Mozilla-Firefox.png 1716w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can even see that one garbage collection happened between 14:01 and 14:02.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-and-next\">And Next?<\/h2>\n\n\n\n<p>Afterwards, you have to create as many <em>dependent item<\/em> as you want to monitor metrics from <code>jstat<\/code>. The more direct solution is to clone previous item. There a several other possibilities to automatically create them all, but I did not had time to try them yet.<\/p>\n\n\n\n<p>And you, do you have any easy ( lazy \ud83d\ude42 ) way to achieve this?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we will see how to add custom monitoring metric into Zabbix and, more precisely, get Java Virtual Machine (JVM) garbage collector heap statics. jstat OpenJDK includes an interesting tool to monitor a JVM: jstat. Let&#8217;s see what we have when running it: I am providing two arguments. -gc to get garbage-collected heap [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[355,2987,1217,143,2430],"type_dbi":[],"class_list":["post-25819","post","type-post","status-publish","format-standard","hentry","category-application-integration-middleware","tag-java-virtual-machine","tag-jstat","tag-jvm","tag-monitoring","tag-zabbix"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Defining Custom Monitoring Metric in Zabbix - dbi Blog<\/title>\n<meta name=\"description\" content=\"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Defining Custom Monitoring Metric in Zabbix\" \/>\n<meta property=\"og:description\" content=\"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-15T14:39:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-11T08:18:36+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Defining Custom Monitoring Metric in Zabbix\",\"datePublished\":\"2023-06-15T14:39:01+00:00\",\"dateModified\":\"2024-09-11T08:18:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/\"},\"wordCount\":760,\"commentCount\":0,\"keywords\":[\"Java Virtual Machine\",\"jstat\",\"jvm\",\"Monitoring\",\"Zabbix\"],\"articleSection\":[\"Application integration &amp; Middleware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/\",\"name\":\"Defining Custom Monitoring Metric in Zabbix - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-06-15T14:39:01+00:00\",\"dateModified\":\"2024-09-11T08:18:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"description\":\"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/zabbix-defining-custom-monitoring-metric\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Defining Custom Monitoring Metric in Zabbix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Defining Custom Monitoring Metric in Zabbix - dbi Blog","description":"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/","og_locale":"en_US","og_type":"article","og_title":"Defining Custom Monitoring Metric in Zabbix","og_description":"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.","og_url":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/","og_site_name":"dbi Blog","article_published_time":"2023-06-15T14:39:01+00:00","article_modified_time":"2024-09-11T08:18:36+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Defining Custom Monitoring Metric in Zabbix","datePublished":"2023-06-15T14:39:01+00:00","dateModified":"2024-09-11T08:18:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/"},"wordCount":760,"commentCount":0,"keywords":["Java Virtual Machine","jstat","jvm","Monitoring","Zabbix"],"articleSection":["Application integration &amp; Middleware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/","url":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/","name":"Defining Custom Monitoring Metric in Zabbix - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-06-15T14:39:01+00:00","dateModified":"2024-09-11T08:18:36+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"description":"What are the possibilities to collect custom metrics and store them into Zabbix. This blog will explain you how.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/zabbix-defining-custom-monitoring-metric\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Defining Custom Monitoring Metric in Zabbix"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=25819"}],"version-history":[{"count":23,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25819\/revisions"}],"predecessor-version":[{"id":26405,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25819\/revisions\/26405"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=25819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=25819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=25819"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=25819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}