{"id":5231,"date":"2023-08-01T09:28:39","date_gmt":"2023-08-01T07:28:39","guid":{"rendered":"https:\/\/promatis.com\/ch\/monitoring-free-disk-space-on-oracle-e-business-suite-instances-in-oracle-cloud-infrastructure-oci\/"},"modified":"2023-08-04T09:54:03","modified_gmt":"2023-08-04T07:54:03","slug":"monitoring-free-disk-space-on-oracle-e-business-suite-instances-in-oracle-cloud-infrastructure-oci","status":"publish","type":"post","link":"https:\/\/promatis-test.de\/ch\/monitoring-free-disk-space-on-oracle-e-business-suite-instances-in-oracle-cloud-infrastructure-oci\/","title":{"rendered":"Monitoring Free Disk Space on Oracle E-Business Suite Instances in Oracle Cloud Infrastructure (OCI)"},"content":{"rendered":"
[et_pb_section fb_built=\"1\" custom_padding_last_edited=\"on|tablet\" disabled_on=\"off|off|off\" admin_label=\"Sektion\" _builder_version=\"4.17.6\" _module_preset=\"default\" custom_padding=\"5vh||5vh||true|false\" custom_padding_tablet=\"5vh||5vh||true|false\" custom_padding_phone=\"5vh||5vh||true|false\" global_module=\"23\" locked=\"off\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_row column_structure=\"1_4,3_4\" _builder_version=\"4.17.6\" _module_preset=\"default\" custom_margin=\"||0px||false|false\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_column type=\"1_4\" _builder_version=\"4.17.6\" _module_preset=\"default\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_image src=\"https:\/\/promatis.com\/wp-content\/uploads\/2022\/07\/johannes-michler.png\" alt=\"Johannes Michler PROMATIS Horus Oracle\" title_text=\"johannes-michler\" _builder_version=\"4.20.2\" _module_preset=\"default\" width=\"90%\" custom_margin=\"0vh||0vh||true|false\" border_radii=\"on|516px|516px|516px|516px\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][\/et_pb_image][\/et_pb_column][et_pb_column type=\"3_4\" _builder_version=\"4.17.6\" _module_preset=\"default\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_text ul_type=\"square\" _builder_version=\"4.21.0\" _module_preset=\"default\" link_font=\"Open Sans||||on|||gcid-0becd5ff-19fc-4653-a221-c8c75771a987|\" link_text_color=\"gcid-0becd5ff-19fc-4653-a221-c8c75771a987\" link_font_size=\"22px\" ul_font=\"Open Sans||||||||\" ul_font_size=\"17px\" ul_line_height=\"1.6em\" header_font=\"|600||on|||||\" header_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_font=\"|600||on|||||\" header_2_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_line_height=\"1.6em\" header_3_font=\"|600|||||||\" header_3_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_4_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_5_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_font_size=\"16px\" custom_margin=\"2vh||0px||false|false\" custom_padding=\"||||true|false\" hover_enabled=\"0\" text_font_size_tablet=\"20px\" text_font_size_phone=\"17px\" text_font_size_last_edited=\"on|tablet\" header_font_size_tablet=\"\" header_font_size_phone=\"28px\" header_font_size_last_edited=\"on|phone\" global_colors_info=\"{%22gcid-32812186-bc94-4de4-814c-2bf202477fd5%22:%91%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22,%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22,%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22%93,%22gcid-0becd5ff-19fc-4653-a221-c8c75771a987%22:%91%22link_text_color%22%93}\" theme_builder_area=\"post_content\" sticky_enabled=\"0\"]<\/p>\n
[\/et_pb_text][et_pb_text ul_type=\"square\" _builder_version=\"4.20.0\" _module_preset=\"default\" link_font=\"Open Sans||||on||||\" link_text_color=\"#00A9A0\" ul_font=\"Open Sans||||||||\" ul_font_size=\"17px\" ul_line_height=\"1.6em\" header_font=\"|600||on|||||\" header_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_font=\"|600||on|||||\" header_2_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_line_height=\"1.6em\" header_3_font=\"|600|||||||\" header_3_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_4_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_5_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_font_size=\"16px\" custom_margin=\"1vh||0px||false|false\" custom_padding=\"||||true|false\" text_font_size_tablet=\"20px\" text_font_size_phone=\"17px\" text_font_size_last_edited=\"on|tablet\" header_font_size_tablet=\"\" header_font_size_phone=\"28px\" header_font_size_last_edited=\"on|phone\" global_colors_info=\"{%22gcid-32812186-bc94-4de4-814c-2bf202477fd5%22:%91%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22%93}\" theme_builder_area=\"post_content\"]<\/p>\n
[\/et_pb_text][et_pb_text ul_type=\"square\" _builder_version=\"4.20.0\" _module_preset=\"default\" text_text_color=\"gcid-0becd5ff-19fc-4653-a221-c8c75771a987\" text_font_size=\"22px\" link_font=\"Open Sans||||on||||\" link_text_color=\"#00A9A0\" ul_font=\"Open Sans||||||||\" ul_font_size=\"17px\" ul_line_height=\"1.6em\" header_font=\"|600||on|||||\" header_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_font=\"|600||on|||||\" header_2_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_2_line_height=\"1.6em\" header_3_font=\"|600|||||||\" header_3_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_4_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_5_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_text_color=\"gcid-32812186-bc94-4de4-814c-2bf202477fd5\" header_6_font_size=\"16px\" custom_margin=\"5px||0px||false|false\" custom_padding=\"||||true|false\" text_font_size_tablet=\"20px\" text_font_size_phone=\"17px\" text_font_size_last_edited=\"on|tablet\" header_font_size_tablet=\"\" header_font_size_phone=\"28px\" header_font_size_last_edited=\"on|phone\" global_colors_info=\"{%22gcid-32812186-bc94-4de4-814c-2bf202477fd5%22:%91%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22,%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22,%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22,%22header_4_text_color%22,%22header_5_text_color%22,%22header_6_text_color%22%93,%22gcid-0becd5ff-19fc-4653-a221-c8c75771a987%22:%91%22text_text_color%22%93}\" theme_builder_area=\"post_content\"]<\/i><\/a><\/i><\/a><\/i><\/a>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=\"1\" _builder_version=\"4.16\" _module_preset=\"default\" custom_padding=\"0vh||10vh||false|false\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_row use_custom_gutter=\"on\" _builder_version=\"4.17.3\" _module_preset=\"default\" custom_padding=\"0px||0px||true|false\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_column type=\"4_4\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\" theme_builder_area=\"post_content\"][et_pb_text _builder_version=\"4.21.0\" _module_preset=\"default\" background_enable_color=\"off\" custom_padding=\"0px||0px||true|false\" inline_fonts=\"Times New Roman\" global_colors_info=\"{%22gcid-32812186-bc94-4de4-814c-2bf202477fd5%22:%91%22header_text_color%22,%22header_2_text_color%22,%22header_3_text_color%22%93,%22gcid-0becd5ff-19fc-4653-a221-c8c75771a987%22:%91%22background_color%22%93}\" theme_builder_area=\"post_content\"]<\/p>\n <\/p>\n Screenshot showing Disk Usage Metrics<\/em><\/p>\n Oracle E-Business Suite (EBS) is a critical application that requires careful monitoring to ensure optimal performance and prevent potential disruptions. One crucial aspect of monitoring EBS instances is keeping track of free disk space. In this guide, we will explore how to effectively monitor the free disk space on Oracle E-Business Suite instances running on Oracle Cloud Infrastructure (OCI). We'll use the \"df\" command to fetch disk space information and send it to OCI Monitoring as a custom metric, enabling you to proactively manage disk space and maintain a reliable EBS environment.<\/p>\n Unfortunately, while OCI Monitoring services allow out of the box monitoring of many aspects of the environment, there is no pre-built functionality to monitor the free space per local mount point \/ file system. Such monitoring is especially necessary when the E-Business Suite application server is a single node and not stored on File Storage Service (FSS). Fortunately, it is not necessary to setup a separate monitoring tool such as nagios or check_mk to fix that; it is possible to ingest arbitrary monitoring data into OCI as follows.<\/p>\n To implement a custom metric and ingest it into the OCI Monitoring service, first of all you need to install and configure the OCI CLI as follows:<\/p>\n Use a script storage_json.sh as the following one to get the available space in proper JSON format:<\/p>\n You should replace COMPID in line 1 with the compartment ID of the instance monitored. As the namespace, you can use whatever is convenient.<\/p>\n Executing this script produces a json as follows:<\/p>\n <\/p>\n Sample JSON output of the script based on df<\/em><\/p>\n While the above storage_json.sh best resides on the server to be monitored, I prefer to have a central server that calls those scripts, has the OCI CLI installed and sends the metric data to the OCI Monitoring service. In an E-Business Suite context, it makes a lot of sense to do so on the E-Business Suite Cloud Manager VM.<\/p>\n Create a script monitor.sh as follows:<\/p>\n Make the shell script executable using the following command:<\/p>\n To continuously monitor the disk space, you can schedule the shell script as a cron job to run at regular intervals (e.g., every 5 minutes):<\/p>\n Add the following line to the crontab file:<\/p>\n This will run the script every 15 minutes and update the disk space metric in OCI Monitoring accordingly.<\/p>\n After some time, enough data should be gathered and uploaded, so it is now time to have a look at the data using OCI Metrics Explorer:<\/p>\n <\/p>\n Available File Storage in OCI Metrics Explorer<\/em><\/p>\n To be alerted when the free disk space falls below the defined thresholds, set up alarms in OCI Monitoring.<\/p>\n By using the \"df\" command and a custom shell script, you can directly fetch the available disk space information from your Oracle E-Business Suite instance and send it to OCI Monitoring as a custom metric. This approach simplifies the process while still allowing you to monitor free disk space effectively. With OCI Monitoring and custom metrics in place, you can proactively manage disk space and ensure the smooth operation of your EBS environment on Oracle Cloud Infrastructure. Happy monitoring!<\/p>\n [\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":" Oracle E-Business Suite (EBS) is a critical application that requires careful monitoring to ensure optimal performance and prevent potential disruptions. One crucial aspect of monitoring EBS instances is keeping track of free disk space. In this guide, we will explore how to effectively monitor the free disk space on Oracle E-Business Suite instances running on Oracle Cloud Infrastructure (OCI).<\/p>\n","protected":false},"author":2,"featured_media":1243,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[23],"tags":[],"dipi_cpt_category":[],"class_list":["post-5231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-techblog"],"_links":{"self":[{"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/posts\/5231"}],"collection":[{"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/comments?post=5231"}],"version-history":[{"count":0,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/posts\/5231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/media\/1243"}],"wp:attachment":[{"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/media?parent=5231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/categories?post=5231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/tags?post=5231"},{"taxonomy":"dipi_cpt_category","embeddable":true,"href":"https:\/\/promatis-test.de\/ch\/wp-json\/wp\/v2\/dipi_cpt_category?post=5231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
Executive Vice President<\/strong> \u2013\u00a0Head of Platforms\u00a0&\u00a0Development<\/p>\nStep 1: Setup OCI CLI<\/h2>\n
sudo yum install python36-oci-cli\noci setup config<\/pre>\n
Step 2: Gather free space in proper format<\/h2>\n
COMPID=ocid1.compartment.oc1..xxxxxxxxxxx\nsrvname=`hostname`\nmy_namespace=\"ebs_promatis\"\ncur_date=`date -u +\"%FT%T.000Z\"`\ndf -m | grep -e \"^\/dev\/\" | tr -d '%' | gawk '\nBEGIN { ORS = \"\"; print \" [ \"}\n{ printf \"%s{\\\"compartmentId\\\": \\\"'$COMPID'\\\",\\\"datapoints\\\": [{\\\"count\\\": 1,\\\"timestamp\\\": \\\"'$cur_date'\\\",\\\"value\\\": %s}],\\\"dimensions\\\": {\\\"server\\\": \\\"'$srvname'\\\",\\\"mountpoint\\\": \\\"%s\\\"},\\\"name\\\": \\\"diskusage\\\",\\\"namespace\\\": \\\"'$my_namespace'\\\"}\",\nseparator, $5, $6\nseparator = \", \"\n}\nEND { print \" ] \" }'<\/pre>\n
Step 3: Upload the free space info to OCI<\/h2>\n
MONITOR_DATA=$(ssh ebsapp01.intern.promatis.de \"sh storage_json.sh\")
oci monitoring metric-data post --endpoint https:\/\/telemetry-ingestion.eu-frankfurt-1.oraclecloud.com --metric-data \"$MONITOR_DATA\"<\/pre>\nchmod +x monitor.sh<\/pre>\n
Step 4: Schedule the Script as a Cron Job<\/h2>\n
crontab -e<\/pre>\n
0,15,30,45 * * * * \/home\/oracle\/oci_monitor\/monitor.sh<\/pre>\n
Step 5: Check the recorded data<\/h2>\n
Step 6: Set Up Alarms<\/h2>\n
\n
Summary<\/h2>\n