<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[The DevOps Journey - Medium]]></title>
        <description><![CDATA[Sharing experiments - Medium]]></description>
        <link>https://medium.com/the-devops-journey?source=rss----f26d1a82073e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>The DevOps Journey - Medium</title>
            <link>https://medium.com/the-devops-journey?source=rss----f26d1a82073e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 26 May 2026 22:58:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/the-devops-journey" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Observability & monitoring — Part 04]]></title>
            <link>https://medium.com/the-devops-journey/observability-monitoring-part-04-8742a06caff4?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/8742a06caff4</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[influxdb]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[pagerduty]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Sat, 29 Dec 2018 15:58:31 GMT</pubDate>
            <atom:updated>2018-12-29T15:58:20.367Z</atom:updated>
            <content:encoded><![CDATA[<h3>Observability &amp; monitoring — Part 04</h3><p>This post is a continuation of my series of posts on Observability &amp; monitoring.</p><p>You can read my previous posts <a href="https://medium.com/the-devops-journey/observability-monitoring-part-01-92efec9f1c0d">Observability &amp; monitoring — Part 01</a>, <a href="https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a">Observability &amp; monitoring — Part 02</a> and <a href="https://medium.com/the-devops-journey/observability-monitoring-part-03-35a4601c0380">Observability &amp; monitoring — Part 03</a> to keep up with the discussion. These posts are broken down into many parts assuming that it will ease the reading &amp; understanding process. It sure helps the writing process ;)</p><p>As promised, we will discuss about the implementation of the metrics monitoring tool kit. Since this is a PoC implementation, I decided to limit the metrics monitoring to a minimal set of metrics. If you need to extend this solution, it’s a matter of adding more exporters to expose additional metrics.</p><p>Moreover, this PoC implements a monitoring tool kit which monitors a deployment of Ubuntu servers in AWS consisting of a WSO2 server cluster. Following is the deployment diagram. Anyway, the implementation is pluggable with any other deployment. You might only require to change few metrics exporters to collect metrics specific to your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vv53Zx5DfMOua_f9" /><figcaption>Deployment in AWS</figcaption></figure><p>Now, we’ll discuss about each tool covering the life cycle of a metric. Let’s keep the below diagram for reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hVazS-faUU_JPp4B" /><figcaption>Basic Architecture with tools</figcaption></figure><h4><strong>Metrics Exposure — Prometheus Exporters</strong></h4><p>Following is the set of initial metrics this monitoring toolkit covers along with the Prometheus exporters used. Since these are a set of common metrics, the readily available exporters[1] were able to cater the requirement.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/19ae50e456ff9f09561ad69397a48fa6/href">https://medium.com/media/19ae50e456ff9f09561ad69397a48fa6/href</a></iframe><p><strong><em>Node Exporter</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/0*LM2wcUULJqHGTvhU" /><figcaption>Metrics covered by node exporter</figcaption></figure><p>The node exporter[2] exports metrics to monitor the status of a node. Metrics for Load average, Memory usage and total number of processes running are readily available.</p><p>Node exporter also supports text file collectors. A text file collector is capable of exporting the metrics written to a file in a previously configured directory.</p><p>In our PoC, the login test is done using the text file collector. There is a component which is capable of doing a login test against the WSO2 server that is running in a node. In order to append the login metrics to a text file every minute, a cronjob is deployed in the Ubuntu servers which makes use of the login component and writes the result to a text file in Prometheus’s text file collector directory.</p><p>If you are using any other service than WSO2, then you might want to design the login test following the above sample.</p><p><strong><em>JMX Exporter</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/0*bmEscuVZuJm6pZMD" /><figcaption>Metrics covered by JMX exporter</figcaption></figure><p>WSO2 servers are Java based servers and have JMX enabled by default. JMX exporter[3] is a Java agent which can be added to JAVA_OPTS in the server. In the case of WSO2 servers, you can add it to the wso2server.sh as follows.</p><blockquote>-javaagent:$Jmx_exporter_agent_path=&lt;port_to_expose_metrics&gt;:$Jmx_exporter_config_path \</blockquote><p>You can refer the post[4] by one of my colleagues to learn the specifics on configuring this exporter for WSO2 servers.</p><p><strong><em>Blackbox Exporter</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/0*9wVNSV64NngxpCsa" /><figcaption>Metrics covered by Blackbox exporter</figcaption></figure><p>The Blackbox exporter[5] can be used to perform TCP, HTTPS connections and export the success or failure as a metric. In this case, we are using the Blackbox exporter for checking the accessibility of the port 9443, which is the default port in which WSO2 servers are running. Blackbox exporter configuration only contains the modules that are supported by the exporter. The other details are added in the Prometheus configuration.</p><p>Following is the Blackbox configuration that is required for our requirement.</p><blockquote>modules:<br> tcp_connect:<br> prober: tcp</blockquote><p><strong><em>MySqld Exporter</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/0*qATU1-6bBbuZEo4a" /><figcaption>Metrics covered by Mysqld exporter</figcaption></figure><p>The Prometheus’s Mysqld exporter[6] is capable of monitoring MYSQL server health based on many metrics. In our case, we will only use the metric result by performing a select query against a particular MySQL server. Connecting to your databases require credentials which can be passed as environment variables or hidden file. Prometheus also supports exporters for many other database solutions[7] as well.</p><h4>Metrics Collection— Prometheus Server</h4><p>Prometheus server requires configurations for discovering the targets that need to be scraped.</p><p><strong><em>Scrape configs</em></strong></p><p>In order to scrape metrics which are exposed by the exporters in previous section, we need configurations to specify different jobs(tasks) for the metric collection. Following is a sample job configuration in Prometheus config file for the node exporter.</p><pre>- job_name: &#39;Node Exporter&#39;<br>  ec2_sd_configs:<br>    - region: &quot;eu-central-1&quot;<br>      profile: &quot;DemoISSetup&quot;<br>      port: 9100</pre><p>To discover nodes in a given AWS deployment many properties[8] such as region, availability zone, instance type or instance tag can be used. AWS API keys or a named AWS profile can also be used to discover targets.</p><p>In our example the region tag is being used. When this configuration is present in Prometheus, it will scrape metrics from port 9100 of all the nodes in AWS ‘eu-central-1’ region.</p><p>Prometheus also supports target discovery in many[9] other widely used deployments such as Azure, Kubernetes and OpenStack. In generic cases it also supports file based and static target discovery.</p><p><strong><em>Tag based configs</em></strong></p><p>Prometheus also supports tag based[10] target selection. That is based on the instance tags in AWS, you can either keep or drop an instance from monitoring. See below examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*fQoEVSf40vN4bhExe0fHkA.png" /><figcaption>relabel configs</figcaption></figure><h4>Metrics Storage— InfluxDB</h4><p>You need to create a database in InfluxDB[11] to store the metrics collected by Prometheus. Then, Prometheus server needs to be configured to read and write to a remote storage as follows.</p><p><em>remote_write:<br>- url: “</em><a href="http://localhost:8086/api/v1/prom/write?db=prometheus"><em>http://localhost:8086/api/v1/prom/write?db=prometheus</em></a><em>&quot;</em></p><p><em>remote_read:<br>- url: “</em><a href="http://localhost:8086/api/v1/prom/read?db=prometheus"><em>http://localhost:8086/api/v1/prom/read?db=prometheus</em></a><em>&quot;</em></p><h4>Metrics Visualization—Grafana</h4><p>As the first step, we need to add InfluxDB as a data source in Grafana as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/0*BCTr48MFry-5WCO0" /></figure><p>Then, based on the metrics from above data source, we can create dashboards to monitor various metrics of the monitored system. We can create separate panels for the metrics we need to monitor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*pYU9ctRWASs48wcDWuBwQg.png" /><figcaption>One of the panels in Grafana dashboard</figcaption></figure><h4>Alerting — Pagerduty</h4><p>We need to create a service in Pagerduty as follows to send the notifications to the on call person(s) via multiple channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*uQaqZmSf1F0xkHjW" /></figure><p>Then, we need an integration key to identify the service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wjTApqzOB-1BalQD" /></figure><p>For the PoC, I have used alert configurations built in Grafana to check the threshold levels and trigger the alert to Pagerduty. So, when we have multiple alert configurations per panel, this will evaluate the metrics values and trigger notification to Pagerduty. For this, we need to configure Pagerduty as a notification channel. Here, we need to add the integration key we obtained from the API service in Pagerduty to send the alerts to that service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*PZjlQTVfgA5tZ5e1" /><figcaption>Notification channels in Grafana</figcaption></figure><p>With these configurations in place, we have our basic monitoring tool kit ready. If you have other tools that are already used in your organization for any part of the metrics life cycle, this tool kit allows the capability to plug that tool without much effort.</p><p>I will be discussing about more tips and tricks on improving this tool kit as well as automating the effort to gain the best out of this solution. Stay tuned :)</p><h4>References</h4><p>[1] <a href="https://prometheus.io/docs/instrumenting/exporters/">https://prometheus.io/docs/instrumenting/exporters/</a></p><p>[2] <a href="https://github.com/prometheus/node_exporter">https://github.com/prometheus/node_exporter</a></p><p>[3] <a href="https://github.com/prometheus/jmx_exporter">https://github.com/prometheus/jmx_exporter</a></p><p>[4] <a href="https://medium.com/@lashan/monitoring-wso2-products-with-prometheus-4ace34759901">https://medium.com/@lashan/monitoring-wso2-products-with-prometheus-4ace34759901</a></p><p>[5] <a href="https://github.com/prometheus/blackbox_exporter">https://github.com/prometheus/blackbox_exporter</a></p><p>[6] <a href="https://github.com/prometheus/mysqld_exporter">https://github.com/prometheus/mysqld_exporter</a></p><p>[7] <a href="https://prometheus.io/docs/instrumenting/exporters/#databases">https://prometheus.io/docs/instrumenting/exporters/#databases</a></p><p>[8] <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config">https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config</a></p><p>[9] <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/">https://prometheus.io/docs/prometheus/latest/configuration/configuration/</a></p><p>[10] <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config">https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config</a></p><p>[11] <a href="https://docs.influxdata.com/influxdb/v1.6/supported_protocols/prometheus">https://docs.influxdata.com/influxdb/v1.6/supported_protocols/prometheus</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8742a06caff4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/observability-monitoring-part-04-8742a06caff4">Observability &amp; monitoring — Part 04</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability & monitoring — Part 03]]></title>
            <link>https://medium.com/the-devops-journey/observability-monitoring-part-03-35a4601c0380?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/35a4601c0380</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[influxdb]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 10:52:04 GMT</pubDate>
            <atom:updated>2019-01-09T08:51:31.762Z</atom:updated>
            <content:encoded><![CDATA[<h3>Observability &amp; monitoring — Part 03</h3><p>This post is a continuation of the posts <a href="https://medium.com/the-devops-journey/observability-monitoring-part-01-92efec9f1c0d">Observability &amp; monitoring — Part 01</a> and <a href="https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a">Observability &amp; monitoring — Part 02</a>.</p><p>These previous posts discussed the basics of observability, metric monitoring and defined the life cycle of a metric.</p><p>In this post, we will discuss how the tools covering the main stages of the metrics monitoring toolkit were evaluated and selected.</p><p>When designing the metrics monitoring toolkit, the goal was to design a system suitable for dynamic deployments, considering modern design paradigms addressing micro service, container based architectures. The toolkit should also be adaptable to any infrastructure let it be a standard on premises deployment, a deployment hosted in Cloud or a container based deployment.</p><p>Based on the basic requirements few tool stacks were shortlisted and evaluated. Following are the stacks.</p><ul><li>Prometheus with Grafana and Alert manager</li><li>TICK stack (Telegraf, InfluxDB, Chronograf, Kapacitor)</li><li>Icinga2</li><li>Sensu and Graphite based stack</li></ul><p>These tool stacks were compared based on many guidelines. Following is a summary of the comparison.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05fadb6658eebc522e66a7f335f3b387/href">https://medium.com/media/05fadb6658eebc522e66a7f335f3b387/href</a></iframe><p>Metrics collection can usually take the push or pull model. In push model, the metrics collection tool just sits there while the plugins do the collection. But, in pull model the metrics collector is responsible for scraping/retrieving the metrics from the defined endpoints. While Prometheus, Telegraf and Icinga2 support the pull model, Sensu does not support the pull model because it has no inbuilt collecting capabilities. Telegraf and Prometehus also support the push model. But Prometheus is best used in pull model while Telegraf in push model.</p><p>When it comes to storing the metrics, Prometheus has an inbuilt time series database. But it is also capable of storing metrics in other external storage[1]. TICK stack uses InfluxDB[2] for metrics storage. InfluxDB supports data retention policies per database and supports querying the metrics too. On the other hand, Icinga2 does not save metrics and only saves the aggregated values as per the requirement. Graphite uses a numeric time series database called Whisper[3].</p><p>Even though there are dashboarding and alerting solutions provided by Prometheus and the TICK stack, we can also integrate other solutions to these systems. When using in a production setup, node discovery capabilities of the solution is very vital. Telegraf and Sensu does not require node discovery for the metric collector as they are using the push model. Icinga2 takes PuppetDB as Import source or manage hosts with Ansible or can use Foreman[4] for host discovery. Prometheus handles node discovery using configs[5]. It has configuration support for many infrastructures.</p><p>Prometheus supports a wide list of exporters and also allows writing exporters if required. Telegraf plugins can be written as per the requirement too, if the provided plugins are not sufficient. Nagios check commands[6] can be used to write checks in Icinga2.</p><p>Based on above comparison, it was decided to use the below stack as the metric tool kit. This is using various solutions across the compared stacks to achieve the best outcome. It was decided to use the Pagerduty trial as the alerting solution as it is already being used by many companies for incident management.</p><ul><li>Prometheus as metric collector</li><li>InfluxDB as metric storage solution</li><li>Grafana as metrics visualization solution</li><li>Pagerduty as alerting solution</li></ul><p>Following is the basic architecture of the metric monitoring toolkit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LEH5YeYpFxQVqd2k" /><figcaption>Architecture of Metric monitoring tool kit</figcaption></figure><p>Prometheus exporters are responsible for exposing existing metrics from third party systems. They are light-weight processes written in Go. Prometheus server which follows the pull model for metrics collection and is designed for reliability. Prometheus can be easily integrated to many supporting tools.</p><p>InfluxDB is a time series database(TSDB), which provides a SQL like query language. In InfluxDB, a metric corresponds to a measurement in the Database. Grafana is a very widely used visualization tool which supports a wide range of data sources including InfluxDB databases. Grafana also includes a built in query parser and provides basic alert configurations as well. Pagerduty allows incident classification and supports multi channel notifications.</p><p>I will be discussing the implementation in detail in my next post. Stay tuned :)</p><p><strong>Update:</strong></p><p>Next post at <a href="https://medium.com/the-devops-journey/observability-monitoring-part-04-8742a06caff4">https://medium.com/the-devops-journey/observability-monitoring-part-04-8742a06caff4</a></p><h4>References</h4><p>[1] <a href="https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage">https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage</a></p><p>[2] <a href="https://www.influxdata.com/time-series-platform/influxdb/">https://www.influxdata.com/time-series-platform/influxdb/</a></p><p>[3] <a href="https://graphite.readthedocs.io/en/latest/whisper.html">https://graphite.readthedocs.io/en/latest/whisper.html</a></p><p>[4] <a href="https://www.icinga.com/2017/04/26/automated-monitoring-icinga-meets-foreman/">https://www.icinga.com/2017/04/26/automated-monitoring-icinga-meets-foreman/</a></p><p>[5] <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file">https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file</a></p><p>[6] <a href="https://www.nagios.org/projects/nagios-plugins/">https://www.nagios.org/projects/nagios-plugins/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35a4601c0380" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/observability-monitoring-part-03-35a4601c0380">Observability &amp; monitoring — Part 03</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability & monitoring — Part 02]]></title>
            <link>https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/d4d81b67c09a</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[lifecycle]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 17:57:32 GMT</pubDate>
            <atom:updated>2019-01-09T08:50:33.509Z</atom:updated>
            <content:encoded><![CDATA[<h3>Observability &amp; monitoring — Part 02</h3><p>This post is a continuation of the post <a href="https://medium.com/the-devops-journey/observability-monitoring-part-01-92efec9f1c0d">Observability &amp; monitoring — Part 01</a>.</p><p>As promised, I will be discussing about metrics monitoring in this post. <br>Metrics monitoring is one of the pillars of Observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*cyFvj9WzZX3BK4OH" /><figcaption>Pillars of Observability</figcaption></figure><p>When it comes to monitoring metrics, we can categorize them based on the following approaches.</p><ol><li>Service level vs. Instance level</li><li>Blackbox vs. Whitebox</li></ol><h4>Service level vs. Instance level</h4><p>Service level metrics monitoring is focused on monitoring service level objectives(SLO) for the system. There are four signals (Latency, Traffic, Errors, Saturation) that are identified as the golden signals of service level monitoring. The SLOs can be established based on these golden signals. Some service level metrics are login results and port availability.</p><p>While service level metrics monitoring keeps track of SLOs, instance level metrics monitoring is needed for diagnosing the root causes. Some sample instance level metrics are load average, disk usage and JVM heap usage.</p><h4><strong>Black box vs. White box</strong></h4><p>Black box monitoring treats a system as a black box and refers to monitoring the system from outside. This type of monitoring indicates the availability of a system and is symptom oriented. So, leveraging operating system level metrics and network level communication metrics can be considered as black box techniques.</p><p>White box monitoring allows detection of future problems and depends on the ability to inspect the internals. In a multi layered system(e.g. WSO2 Public Cloud), a symptom from one layer can be the reason for an issue in another layer. For example, in the database system monitoring, slow database reads is a symptom. But for the application layer, the latency in database access can lead to a latency in invocation.<br>So, the white box metrics should be determined in a way that the cause for an issue is identifiable across the involved layers. It is advisable to define thresholds for the metrics such that an anomaly is distinguishable.</p><p><strong>Life cycle of a metric</strong></p><p>During metrics monitoring, we can define five main stages of a metric.<br>Any toolkit that is being used for monitoring should cover these stages in order to provide meaningful insights on the metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/0*Z4aefrDs4mdVAy96" /><figcaption>Life cycle of a metric</figcaption></figure><ul><li><strong>Metrics exposure : </strong>A mechanism to expose metrics to an external monitoring tool from the system that is being monitored</li><li><strong>Metrics collection : </strong>A mechanism for collecting the exported metrics</li><li><strong>Metrics storage : </strong>A mechanism to store the collected metrics to gain insights on the trends of the metrics</li><li><strong>Metrics visualization : </strong>A mechanism to visualize, track and identify trends in the metrics over time</li><li><strong>Alerting:</strong> A mechanism to notify the system administrators on any anomalies in the metrics</li></ul><p>I will be discussing about a metrics monitoring tool kit that involves tools covering above five stages in my next post. Stay tuned!</p><p><strong>Update:</strong></p><p>Next post at <a href="https://medium.com/the-devops-journey/observability-monitoring-part-03-35a4601c0380">https://medium.com/the-devops-journey/observability-monitoring-part-03-35a4601c0380</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4d81b67c09a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a">Observability &amp; monitoring — Part 02</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘chmod’ — For Linux/Unix users]]></title>
            <link>https://medium.com/the-devops-journey/chmod-for-linux-unix-users-422a1b621b73?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/422a1b621b73</guid>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Mon, 10 Dec 2018 16:42:08 GMT</pubDate>
            <atom:updated>2016-09-28T04:59:10.519Z</atom:updated>
            <content:encoded><![CDATA[<p>‘chmod’ command is used to change permissions of a file/directory by Linux/Unix users.</p><p>This command can be used in 2 different forms.</p><h3><strong>1. Symbolic permission notation</strong></h3><pre>chmod <em>who</em>=<em>permissions</em> <em>filename</em></pre><p><strong>‘who’ refers to :</strong></p><p><strong>u:</strong> user who owns the file , <strong>g :</strong> group that file belongs to , <strong>o:</strong> other users ,</p><p><strong>a: </strong>all the above</p><p><strong>‘permissions’ refers to:</strong></p><p>r: read , w: write , x: execute</p><p>So, an example ‘chmod’ command to give,</p><ul><li>read,write and execute permissions to a user</li><li>read and execute permissions to the group</li><li>read permissions to other users</li></ul><p>will be as follows.</p><pre>chmod u=rwx,g=rx,o=r myfile</pre><h3><strong>2. Octal permission notation</strong></h3><pre>chmod <em>octal-number</em> <em>filename</em></pre><p>The <strong>‘octal-number’ </strong>above is the representation of permissions in a numerical manner.</p><p>When taking user, group, other from the representation in the symbolic notation and considering the same example,</p><p>u : r w x : 111 : 7</p><p>g : r — x : 101: 5</p><p>o : r — — :100:4</p><pre>chmod 754 myfile</pre><p><strong>References:</strong></p><ul><li><a href="http://catcode.com/teachmod/">Tutorial for chmod</a></li><li><a href="http://www.computerhope.com/unix/uchmod.htm">Linux and Unix chmod command help and examples</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=422a1b621b73" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/chmod-for-linux-unix-users-422a1b621b73">‘chmod’ — For Linux/Unix users</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Booting Process]]></title>
            <link>https://medium.com/the-devops-journey/linux-booting-process-a43554dc72cd?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/a43554dc72cd</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[grub]]></category>
            <category><![CDATA[boots]]></category>
            <category><![CDATA[os]]></category>
            <category><![CDATA[kernel]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Sun, 09 Dec 2018 05:49:06 GMT</pubDate>
            <atom:updated>2018-12-09T05:48:29.263Z</atom:updated>
            <content:encoded><![CDATA[<p>When you press the power on button and wait for few seconds, you get prompted for user login. Ever wondered how this happens?</p><p>Today’s plan is to clear the magic behind the process of getting this login prompt after power on i.e. the booting process. I’ll be discussing this in the context of a Linux based system, other OS(Operating System) boot up might slightly vary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZN3WGAFAjbZLRA709Zsa8A.png" /><figcaption>my login screen ;)</figcaption></figure><p>The Linux booting process can be summed up in six main steps as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*whNp0O58hsm-Mri5UTGavw.png" /><figcaption>steps in booting process</figcaption></figure><ol><li><strong>BIOS (Basic Input Output System)</strong></li></ol><p>The main purpose of the BIOS is to perform system integrity checks, find the boot loader program and pass the control to that program. BIOS is an OS independent, special piece if firmware which runs from ROM(Read Only Memory).<br>The system integrity check performed by BIOS is called POST(Power On Self Test). This is a very brief test on CPU, memory and storage devices to verify that the system is in a boot-able state.</p><p>Then, it will check in the boot priority order to find a boot-able device. It will check in Disk drive, SD card reader, CD/DVD ROM, hard drive according to the boot priority that is configured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibmJI8Ti9ZGItNe910XJOw.jpeg" /><figcaption>My boot priority order</figcaption></figure><p>Once a boot-able device is located, it will search for the Master Boot Record, load it and hand over the control to it.</p><p><strong>2. MBR (Master Boot Record)</strong></p><p>The master boot record is located in the first sector of boot-able disk( in my case it’s ‘dev/sda’ — these device files change based on the controllers used)</p><p>The master boot record is less than 512 bytes in size and contains three main portions — Primary boot loader, partition table and MBR validation check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*jEWPLAKZb7y56J03vfVgkw.png" /></figure><p>The MBR validation check contains information about GRUB(Grand Unified Boot loader).</p><p><strong>3. GRUB</strong></p><p>GRUB is responsible for starting the operating system and has knowledge of the file system. Older Linux systems used another boot loader named LILO(Linux Loader).</p><p>GRUB configuration file (/boot/grub/grub.conf), contains information about kernel and the Init rd(Initial RAM Disk) image. Init rd contains necessary modules/drivers to load actual OS file system.</p><p><strong>$ ls -F /boot/</strong> — lists Linux kernel images, init rd image and other necessary information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*_TobOQe3uKyIKcfJ5B6vsQ.png" /><figcaption>Contents of boot directory</figcaption></figure><p>If multiple kernel images are present, GRUB shows a splash screen and prompts to select. If not selected, GRUB loads the default kernel according to configuration.</p><p><strong>4. KERNEL</strong></p><p>Kernel mounts the root file system as specified in the grub.conf and starts ‘/sbin/init’ process. Once the root file system is loaded, kernel dismounts the temporary file system and loads the real file system.</p><p><strong>$ ps -ef | grep init </strong>— can check the ‘/sbin’process</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/0*Uc67Sw6MsuYR4iAQ" /><figcaption>Kernel initialization process with process id 1</figcaption></figure><p>Kernel is responsible for getting the hardware running.</p><p>You can view the messages related to Linux kernel using the Kernel ring buffer. Kernel ring buffer is a data structure that is always the same size and when it’s full, old messages are discarded to give place for latest messages. This content gets stored in ‘/var/log/dmesg’</p><p><strong>$dmesg </strong>— prints content of kernel ring buffer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rzHOsNHT1bQ1ykB1SDaPbw.png" /><figcaption>Contents of kernel ring buffer</figcaption></figure><p><strong>$ uname -mrs — </strong>shows the kernel image that’s being loaded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*B2SLHgdSFKd2eCIilLiHJw.png" /></figure><p><strong>$ dpkg — list | grep linux-image —</strong> lists all available kernel images</p><p><strong>5. INIT</strong></p><p>In older systems, kernel looks at ‘/etc/inittab’ file to check the run level. Following are available run levels.</p><p>0 — halt<br>1 — single user mode<br>2 — multi user mode without NFS<br>3 — Full multi user mode<br>4 — unused<br>5 — X11 (run level 3 + display manager)<br>6 — reboot</p><p>Now, ‘systemd’ has taken over ‘inittab’ and systemd has targets which are roughly equivalent to run levels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*bVtK0SmG-PLJ_qmX" /><figcaption>Systemd targets</figcaption></figure><p>When inittab is used, to change the default run level it can be added to ‘initdefault’. When systemd is used, ‘/etc/init/rc-sysinit.conf’ contains the default run level information.</p><p><strong>6. RUN LEVELS</strong></p><p>Depending on run level(target), kernel starts executing the programs from one of the directories below.</p><p><strong>$ ls /lib/systemd/system</strong> — lists available targets</p><p>Run level targets here are simlinks</p><p><strong>Run level 0 </strong>— /etc/rc.d/rc0.d/ or /etc/rc0.d<br><strong>Run level 1</strong>— /etc/rc.d/rc1.d/ or /etc/rc1.d<br><strong>Run level 2</strong>— /etc/rc.d/rc2.d/ or /etc/rc2.d<br><strong>Run level 3</strong>— /etc/rc.d/rc3.d/ or /etc/rc3.d<br><strong>Run level 4</strong>— /etc/rc.d/rc4.d/ or /etc/rc4.d<br><strong>Run level 5</strong>— /etc/rc.d/rc5.d/ or /etc/rc5.d<br><strong>Run level 6</strong>— /etc/rc.d/rc6.d/ or /etc/rc6.d</p><p>If you check inside these directories, they contain programs starting with ‘S’ or ‘K’. <strong>S</strong> stands for startup scripts and <strong>K</strong> stands for kill scripts. The succeeding numbers in the program name denote the order of programs.</p><p>Based on the target/run level, the OS will be loaded and you will be prompted for login. :)</p><h4>References</h4><p><a href="https://www.youtube.com/watch?v=RgLMBXg5b9I">https://www.youtube.com/watch?v=RgLMBXg5b9I</a><br><a href="https://www.liquidweb.com/kb/linux-runlevels-explained/">https://www.liquidweb.com/kb/linux-runlevels-explained/</a><br><a href="https://www.youtube.com/watch?v=ZtVpz5VWjAs">https://www.youtube.com/watch?v=ZtVpz5VWjAs</a><br><a href="https://www.youtube.com/watch?v=RdbyPwo4W2E">https://www.youtube.com/watch?v=RdbyPwo4W2E</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a43554dc72cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/linux-booting-process-a43554dc72cd">Linux Booting Process</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello docker]]></title>
            <link>https://medium.com/the-devops-journey/hello-docker-fcb147e8a37?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/fcb147e8a37</guid>
            <category><![CDATA[activemq]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[esb]]></category>
            <category><![CDATA[wso2]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 17:00:34 GMT</pubDate>
            <atom:updated>2017-04-07T06:38:16.548Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker is a software container platform. Developers use Docker to eliminate machine specific issues.</p><p>You can install docker using following commands.</p><p>You can refer <a href="https://docs.docker.com/engine/installation/">https://docs.docker.com/engine/installation/</a> to get docker installed in your machine.</p><p>I am using ubuntu OS and I will discuss on how you can get separate images for WSO2 ESB and Activemq.</p><p>A Dockerfile provides instructions for Docker to build a docker image.<br>For each line in the Dockerfile, a new docker image is built, if that line results in a change to the image used.</p><p>You can create you own images and commit them to Docker Hub so that you can share them with others. The Docker Hub is a public registry maintained by Docker, Inc. that contains images you can download and use to build containers.</p><p>How to create a docker image for WSO2 ESB.</p><p>Prerequisites:</p><ol><li>Download zip file of wso2esb-5.0.0</li><li>Create a file named “Dockerfile” in the same path</li></ol><p>Dockerfile:</p><p>Following is the content in the Docker file to create an ESB image.</p><blockquote>FROM ubuntu:14.04</blockquote><blockquote>MAINTAINER dilhasha <a href="mailto:dilhasha@wso2.com">dilhasha@wso2.com</a></blockquote><blockquote># Install Java.<br>RUN \<br> echo oracle-java8-installer shared/accepted-oracle-license-v1–1 select true | debconf-set-selections &amp;&amp; \<br> apt-get update &amp;&amp; \<br> apt-get install -y software-properties-common &amp;&amp; \<br> add-apt-repository -y ppa:webupd8team/java &amp;&amp; \<br> apt-get update &amp;&amp; \<br> apt-get install -y oracle-java8-installer &amp;&amp; \<br> rm -rf /var/lib/apt/lists/* &amp;&amp; \<br> rm -rf /var/cache/oracle-jdk8-installer</blockquote><blockquote>RUN \<br> apt-get update &amp;&amp; \<br> apt-get install zip -y</blockquote><blockquote>COPY wso2esb-5.0.0.zip /opt</blockquote><blockquote>WORKDIR “/opt”</blockquote><blockquote>RUN unzip /opt/wso2esb-5.0.0.zip</blockquote><blockquote>ENV JAVA_HOME /usr/lib/jvm/java-8-oracle</blockquote><blockquote>RUN chmod +x /opt/wso2esb-5.0.0/bin/wso2server.sh</blockquote><blockquote>EXPOSE 9444</blockquote><blockquote>CMD [“/opt/wso2esb-5.0.0/bin/wso2server.sh”]</blockquote><p>In the above dockerfile, we install java and then copy the ESB file and start the ESB. Let’s see what each of the keywords in the Dockerfile mean.</p><p><strong>FROM :</strong> The base image from which we start building our custom image</p><p><strong>RUN :</strong> Runs commands that are specified — as a root user using sh -c “your-given-command”</p><p><strong>COPY :</strong> will copy a file from the host machine into the container</p><p><strong>WORKDIR :</strong> sets location from which to run commands from</p><p><strong>EXPOSE:</strong> Will expose a port to host machine(Allows us to access esb’s management console)</p><p><strong>CMD : </strong>Will run a command. This is usually the long-running process in the container. Here, we are running the wso2server.sh script.</p><p>Now we can build this Dockerfile using the below command. &lt;name&gt; can be anything you prefer. This will look for a file named “Dockerfile” and run it.</p><blockquote>docker build -t &lt;name&gt; .</blockquote><p>After the above command exists, you will see a success message as below.</p><blockquote>Successfully built &lt;image_id&gt;</blockquote><p>Now, you can start the container using the below command.</p><blockquote>sudo docker run -p &lt;port_to_expose&gt;:&lt;port_in_host_machine&gt; -t &lt;image_id&gt;</blockquote><p>For the ESB example, port to export is “9443” and you can use any port you prefer in your host machine to expose it.</p><p>When you run above command you’ll notice that ESB gets started and you can access the management console at “http://localhost:&lt;port_in_host_machine&gt;”.</p><p>How to create a docker image for Apache activemq.</p><p>Prerequisites:</p><ol><li>Download zip file of apache-activemq-5.14.4</li><li>Create a file named “Dockerfile” in the same path</li></ol><p>Following is the Dockerfile used to build an Activemq image.</p><blockquote>FROM ubuntu:14.04</blockquote><blockquote>MAINTAINER dilhasha <a href="mailto:dilhasha@wso2.com">dilhasha@wso2.com</a></blockquote><blockquote># Install Java.<br>RUN \<br> echo oracle-java8-installer shared/accepted-oracle-license-v1–1 select true | debconf-set-selections &amp;&amp; \<br> apt-get update &amp;&amp; \<br> apt-get install -y software-properties-common &amp;&amp; \<br> add-apt-repository -y ppa:webupd8team/java &amp;&amp; \<br> apt-get update &amp;&amp; \<br> apt-get install -y oracle-java8-installer &amp;&amp; \<br> rm -rf /var/lib/apt/lists/* &amp;&amp; \<br> rm -rf /var/cache/oracle-jdk8-installer</blockquote><blockquote>RUN \<br> apt-get update &amp;&amp; \<br> apt-get install zip -y</blockquote><blockquote>COPY apache-activemq-5.14.4.zip /opt</blockquote><blockquote>WORKDIR “/opt”</blockquote><blockquote>RUN unzip /opt/apache-activemq-5.14.4.zip</blockquote><blockquote>ENV JAVA_HOME /usr/lib/jvm/java-8-oracle</blockquote><blockquote>RUN chmod +x /opt/apache-activemq-5.14.4/bin/activemq</blockquote><blockquote>EXPOSE 8161</blockquote><blockquote>CMD [“/opt/apache-activemq-5.14.4/bin/activemq”,”console”]</blockquote><p>The only new thing in this Dockerfile is the below line.</p><blockquote>CMD [“/opt/apache-activemq-5.14.4/bin/activemq”,”console”]</blockquote><p>This CMD [“command” , “parameter”] format helps us to provide an additional parameter to our script.</p><p>You can use the same commands as in the previous section and see that the activemq instance gets started in console mode.</p><p>Thanks :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcb147e8a37" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/hello-docker-fcb147e8a37">Hello docker</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability & monitoring — Part 01]]></title>
            <link>https://medium.com/the-devops-journey/observability-monitoring-part-01-92efec9f1c0d?source=rss----f26d1a82073e---4</link>
            <guid isPermaLink="false">https://medium.com/p/92efec9f1c0d</guid>
            <category><![CDATA[postmortem]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[incident-management]]></category>
            <dc:creator><![CDATA[Fathima Dilhasha]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 16:40:46 GMT</pubDate>
            <atom:updated>2019-01-09T08:49:57.907Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Observability</strong> is a property of a system which indicates whether the internal states of the system can be determined based on the external outputs. On the other hand <strong>monitoring</strong> is an activity we execute to identify possible issues, estimate capacities,etc.</p><p>If there is no monitoring in a system, we cannot even be sure whether the service is working. So, it is very important to have a thoughtfully designed monitoring infrastructure. Following is a model developed by Google engineers on developing and running distributed systems based on Maslow’s hierarchy of need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*RZoID1SMvGgJOG8j" /><figcaption>Source : <a href="https://landing.google.com/sre/book/index.html">https://landing.google.com/sre/book/index.html</a></figcaption></figure><blockquote>Without monitoring, you have no way to tell whether the service is even working; absent a thoughtfully designed monitoring infrastructure, you’re flying blind.</blockquote><p>It is important to review which characteristics the system needs to be observed and which monitoring system will be used for the observation.</p><p>There are three pillars of observability i.e. metrics, tracing and logging. Monitoring is basically used in terms of metrics monitoring.</p><p>Based on my past experience, it is learnt that trying to build a monitoring system which will identify all possible failures is an impossible task. Rather we should focus on a good monitoring system which can identify a failure when it happens and helps in post mortem analysis. We should also be able to detect severe anomalies and avoid such failures as well.</p><p>Monitoring system should address two questions: what’s broken, and why?</p><blockquote>In summary, Observability is a property of a system and Monitoring is an activity we perform on a system.</blockquote><p>While Observability covers a larger scope, monitoring is mainly used in terms of metrics monitoring.</p><p>I will be discussing on metrics monitoring in my next post. Stay tuned :)</p><p><strong>Update :</strong></p><p>Next post at <a href="https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a">https://medium.com/the-devops-journey/observability-monitoring-part-02-d4d81b67c09a</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92efec9f1c0d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devops-journey/observability-monitoring-part-01-92efec9f1c0d">Observability &amp; monitoring — Part 01</a> was originally published in <a href="https://medium.com/the-devops-journey">The DevOps Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>