{"id":485,"date":"2021-01-17T11:44:55","date_gmt":"2021-01-17T10:44:55","guid":{"rendered":"https:\/\/ilmarkerm.eu\/blog\/?p=485"},"modified":"2021-01-17T11:48:43","modified_gmt":"2021-01-17T10:48:43","slug":"mining-log-files-under-adr-base","status":"publish","type":"post","link":"https:\/\/ilmarkerm.eu\/blog\/2021\/01\/mining-log-files-under-adr-base\/","title":{"rendered":"Mining log files under ADR base"},"content":{"rendered":"\n<p>For a while now Oracle is using standardised log structure under Automatic Diagnostic Repository (ADR) &#8211; this includes database alert.log, listener log, CRS log, ASM log and much more. All this is very valuable information for monitoring.<\/p>\n\n\n\n<p>I&#8217;m a fan of using Grafana (using InfluxDB as a data source) for monitoring, since in Grafana it is very easy to create your own customised dashboards and alerts &#8211; so lately I&#8217;ve ben creating my own monitoring agents to gather send Oracle monitoring information to InfluxDB.<\/p>\n\n\n\n<p>InfluxDB is fast time series database, perfect for storing monitoring data &#8211; each record must have timestamp associated and data retention is also natively built in.<\/p>\n\n\n\n<p>Since our Oracle environment is exploding in size, my goal is also to have monitoring tools\/agents that figure out what to do themselves, deployed using Ansible. All without any human involvment.<\/p>\n\n\n\n<p>Here is monitoring agent with following high level features:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Searches for all recently modified alert\/log.xml files under ADR base<\/li><li>Parses newly added log messages for any tags that Oracle itself has added (like component and message level)<\/li><li>Parses log messages against custom regular expressions to parse out custom information<\/li><\/ul>\n\n\n\n<p>Code is here:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/ilmarkerm\/monitoring\/blob\/main\/oracle\/adr-log.py\">https:\/\/github.com\/ilmarkerm\/monitoring\/blob\/main\/oracle\/adr-log.py<\/a><\/p>\n\n\n\n<p>It is expected to run as SystemD service. I currently left in some Ansible tags, since this is how I distribute the agent to all servers (and to make sure people do no just take the code and run it without reading and understanding it).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a while now Oracle is using standardised log structure under Automatic Diagnostic Repository (ADR) &#8211; this includes database alert.log, listener log, CRS log, ASM log and much more. All this is very valuable information for monitoring. I&#8217;m a fan of using Grafana (using InfluxDB as a data source) for monitoring, since in Grafana it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[58,4],"class_list":["post-485","post","type-post","status-publish","format-standard","hentry","category-blog-entry","tag-monitoring","tag-oracle"],"_links":{"self":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/comments?post=485"}],"version-history":[{"count":7,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/485\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/485\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/media?parent=485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/categories?post=485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/tags?post=485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}