{"id":276,"date":"2009-03-19T00:02:38","date_gmt":"2009-03-18T22:02:38","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=276"},"modified":"2021-10-06T22:41:39","modified_gmt":"2021-10-06T20:41:39","slug":"mrtg-graph-only-one-value","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html","title":{"rendered":"Graph Only One Value in MRTG"},"content":{"rendered":"<div style=\"float:left; margin-right:15px; margin-top:0px;\">\n<script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- 200x200, Netexpertise --><br \/>\n<ins class=\"adsbygoogle\" style=\"display:inline-block;width:200px;height:200px\" data-ad-client=\"ca-pub-6495750100906580\" data-ad-slot=\"1946825373\"><\/ins><br \/>\n<script><br \/>\n(adsbygoogle = window.adsbygoogle || []).push({});<br \/>\n<\/script><\/div>\n<p><a href=\"http:\/\/oss.oetiker.ch\/mrtg\/\">MRTG<\/a> needs at least 2 values to generate graphs. Thus, Most configurations contain the same OID twice in the target line.<br \/>\nThis leads to 2 problems:<br \/>\n&#8211; The same data is collected twice which requires more bandwidth, especially when a large number of hosts is monitored<\/p>\n<div id=\"imgright\">\n<a href=\"http:\/\/www.amazon.com\/gp\/product\/B00262SB92?ie=UTF8&amp;tag=netexpertise-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00262SB92\"><img decoding=\"async\" border=\"0\" src=\"\/images\/MRTG_SL110_.jpg\"><\/a><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=netexpertise-20&amp;l=as2&amp;o=1&amp;a=B00262SB92\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\"><\/div>\n<p>&#8211; The value may vary during this very short lap, producing 2 different lines in the graph. This is the case with AS400 cpus for instance.<br \/>\nTo graph only one value such as CPU or memory usage, you can write a short script that collects the SNMP field once:<\/p>\n<pre>mrtg@snmp-server:~&gt; cat \/home\/mrtg\/get-cpu.sh\n#!\/bin\/sh\nIP=$1\nCOMMUNITY=$2\nSNMP_VERSION=$3\nCPU_LOAD=`snmpget -c $COMMUNITY -v $SNMP_VERSION $IP .1.3.6.1.2.1.25.3.3.1.2.2 | awk '{print $(NF) }'`\necho $CPU_LOAD\necho $CPU_LOAD<\/pre>\n<p>&nbsp;<br \/>\n<img decoding=\"async\" src=\"\/images\/as400.cpu-day.png\" alt=\"MRTG CPU Usage\"><br \/>\n&nbsp;<br \/>\nReplace with your own OID, and call the script in your MRTG config file:<\/p>\n<pre>Target[cpu]:`\/home\/mrtg\/get-cpu.sh my_ip my_community 1`<\/pre>\n<p>Quick and easy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MRTG needs at least 2 values to generate graphs. Thus, Most configurations contain the same OID twice in the target line. This leads to 2 problems: &#8211; The same data is collected twice which requires more bandwidth, especially when a large number of hosts is monitored &#8211; The value may vary during this very short [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[202],"tags":[438,205,207],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Graph Only One Value in MRTG<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Graph Only One Value in MRTG\" \/>\n<meta property=\"og:description\" content=\"MRTG needs at least 2 values to generate graphs. Thus, Most configurations contain the same OID twice in the target line. This leads to 2 problems: &#8211; The same data is collected twice which requires more bandwidth, especially when a large number of hosts is monitored &#8211; The value may vary during this very short [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2009-03-18T22:02:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-06T20:41:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=netexpertise-20&amp;l=as2&amp;o=1&amp;a=B00262SB92\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html\",\"name\":\"Netexpertise - Graph Only One Value in MRTG\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2009-03-18T22:02:38+00:00\",\"dateModified\":\"2021-10-06T20:41:39+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"breadcrumb\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Graph Only One Value in MRTG\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Graph Only One Value in MRTG","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":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Graph Only One Value in MRTG","og_description":"MRTG needs at least 2 values to generate graphs. Thus, Most configurations contain the same OID twice in the target line. This leads to 2 problems: &#8211; The same data is collected twice which requires more bandwidth, especially when a large number of hosts is monitored &#8211; The value may vary during this very short [&hellip;]","og_url":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html","og_site_name":"Netexpertise","article_published_time":"2009-03-18T22:02:38+00:00","article_modified_time":"2021-10-06T20:41:39+00:00","og_image":[{"url":"http:\/\/www.assoc-amazon.com\/e\/ir?t=netexpertise-20&amp;l=as2&amp;o=1&amp;a=B00262SB92"}],"author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html","url":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html","name":"Netexpertise - Graph Only One Value in MRTG","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2009-03-18T22:02:38+00:00","dateModified":"2021-10-06T20:41:39+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"breadcrumb":{"@id":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.netexpertise.eu\/en\/networking\/monitoring\/mrtg-graph-only-one-value.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Graph Only One Value in MRTG"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/276"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}