<?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[Stories by Izek Chen on Medium]]></title>
        <description><![CDATA[Stories by Izek Chen on Medium]]></description>
        <link>https://medium.com/@izekchen?source=rss-1e2db57d473c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pw_eng53R3WxYij6zJdd5A.jpeg</url>
            <title>Stories by Izek Chen on Medium</title>
            <link>https://medium.com/@izekchen?source=rss-1e2db57d473c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 05:56:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@izekchen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My 18-Day Ultramarathon: From Vibe Coding to Production for Global Event]]></title>
            <link>https://izekchen.medium.com/my-18-day-ultramarathon-from-vibe-coding-to-production-for-global-event-c3ecadff7030?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3ecadff7030</guid>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 12:11:38 GMT</pubDate>
            <atom:updated>2026-02-27T12:11:38.038Z</atom:updated>
            <content:encoded><![CDATA[<p>These past 18 days have been incredibly intense — honestly, it felt like a high-stakes marathon between the cloud and the code.</p><p>It all started simply enough. Leadership asked: “Any chance we could do something fun for an Energizer?” I took the bait, aiming to build a creative “TAM Energizer” for the Google Cloud Accelerate session. At the time, I had no idea this decision would push me to my absolute limit.</p><p>I started out in experimental mode, using Antigravity for what we call “Vibe Coding.” It was a surreal experience — almost like having a conversation with AI to manifest the user journey I had in my head. But the moment I tried to transition from a prototype to a production-grade tool for a global event, I realized just how massive the gap was. This wasn’t just about clicking a few buttons; for an event of this scale, the stakes were on a different level.</p><p>To bridge that gap, I went into a total “hermit mode.” On top of my regular day job, I was squeezing out over 20 extra hours a week. I spent my nights constantly switching accounts, burning through tokens, and hunting for every available resource just to keep the momentum going. During the final week of reviews, the requirements kept shifting. I had to use Antigravity to run non-stop experiments in real-time just to see if we could push the quality even further.</p><p>The core of the challenge was building a real-time interactive engine. The goal was to allow hundreds of attendees to upload their selfies instantly, use Veo to generate personalized “Hero Images,” and then aggregate those hundreds of AI-generated portraits into a single, cohesive cinematic video — all happening live.</p><p>The lowest point came when I looked at the early, “entry-level” video outputs. I genuinely doubted myself: <em>Can I really use vibe coding to build a piece of software and, at the same time, produce the cinematic vision I have in my head?</em></p><p>The other massive hurdle was Prompting at Scale. I had to ensure that no matter who entered the content, the final prompts would yield stable, high-quality images and videos. I spent ages “death-matching” with prompt tuning — figuring out how to control transitions, camera angles, and all those cinematic details to make the video flow. It had to look professional while accurately delivering our strategic message. Plus, I had to ensure the “Hero Images” had enough variety and local flair, like featuring specific regional architecture.</p><p>Through this, I saw the true power of AI, but also hit its ceiling. When logic gets too complex, AI starts to suffer from “internal hallucinations.” It taught me a hard lesson: you can’t just rely on an AI’s “lightbulb moment.” Nailing down the architecture and having a rigorous testing phase from day one is what actually determines if a project succeeds.</p><p>One of the cooler parts was digging back into my background in music. I was constantly obsessing over the “sync” between the audio and video — the beat-matching, the crossfades, making it feel natural. It stopped being just “coding” and turned into a full-on creative production. I want to give a huge shout-out to my manager, the leadership, and the team who supported me throughout this — especially with the music generation and fine-tuning the lyrics to get the vibe just right.</p><p>The toughest battle, though, was performance. Initially, processing those hundreds of individual images into a 3-minute video took several hours — which is a non-starter for a live 1-hour session. I locked myself away to handle the performance tuning while simultaneously polishing the video details. Since this was going live for a large audience, I also had to bake in stress testing and security protocols. In the end, I managed to crush the generation time from several hours down to under 10 minutes.</p><p>On the day of the event, seeing everything play out on the big screen exactly as I envisioned — hundreds of our own faces woven into an AI-generated masterpiece — it finally hit me what these 18 days were all about. The feedback from the crowd and the leadership was fantastic, and seeing that impact made every late night worth it.</p><p>This wasn’t just a project. It was a full End-to-End experience — from experiment to production, from vibe coding to cross-disciplinary media production. These 18 days were brutal, but as Google Cloud Accelerate comes to a close, I know I played my part.</p><p>This was a proof of concept for my own capabilities. It was a tough few weeks, but I made it through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dXzkOr318PnZtw9lcFAFA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3ecadff7030" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Okta integration with Amazon Managed Grafana]]></title>
            <link>https://izekchen.medium.com/okta-integration-with-amazon-managed-grafana-aa5b7fbc076b?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa5b7fbc076b</guid>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[amg]]></category>
            <category><![CDATA[okta]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Fri, 18 Mar 2022 05:27:05 GMT</pubDate>
            <atom:updated>2022-03-18T05:27:05.772Z</atom:updated>
            <content:encoded><![CDATA[<p>The managed Grafana is getting popular since it is well integrated with tons of amazon services. I am start seeing more people asking how to do the okta integration with permission separate. Let’s go over the steps.</p><p>The below setup allows to achieve the integration.</p><ol><li>Create two okta group, grafana_admin and grafana_viewer and assign to them based on the requirement</li><li>Create App Integration -&gt;choose SAML 2.0</li><li>Fill in the Application name and hit Next</li><li>Configure SAML as follows :<br> <strong>Single Sign On URL</strong> : Copy the Service provider reply URL (Assertion consumer service URL) here from workspace</li></ol><pre>Example: <a href="https://g-2234fc123d.grafana-workspace.us-west-2.amazonaws.com/saml/acs">https://g-xxx.grafana-workspace.us-east-1.amazonaws.com/saml/acs</a></pre><p><strong>5. Audience URI (SP Entity ID) </strong>: Copy the Service Provider (Entity ID) URL here.</p><pre>Example: <a href="https://g-2234fc123d.grafana-workspace.us-west-2.amazonaws.com/saml/metadata">https://g-xxx.grafana-workspace.us-east-1.amazonaws.com/saml/metadata</a></pre><p>6. . Select the option ‘Use this for Recipient URL and Destination URL’</p><p>7. Keep the other settings as default</p><p>8. Set the ‘Attribute Statement’ as follows :<br>displayName : user.login ( name format as unspecified)<br>mail : user.email ( name format as unspecified)</p><p>9. set the ‘Group Attribute Statement’ as follows:<br>Group: Matches regex: grafana*</p><p>10. Create</p><p>11. Copy the URL for the ‘Idp Metadata URL’ provided in the ‘Sign On’ okta tab and configure SAML authentication [1] on Grafana such that<br>I<strong>mport Method -&gt; URL</strong> : &lt;enter the URL of the IdP metadata.&gt;<br><strong>Assertion Attribute Role</strong> : Role<br><strong>Admin Role values</strong> : grafana_admin<br>Additional setting: keep it as default, you can increase login validity duration.</p><p>12. Submit the SAML configuration and try accessing Grafana using the Grafana Workspace URL provided on the AWS Console</p><p>13. test different group to see if the permission is correct</p><p>That’s it. I hope you success on this setup.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa5b7fbc076b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OKTA integration with VPC-based Amazon Opensearch through Nginx]]></title>
            <link>https://izekchen.medium.com/okta-integration-with-vpc-based-amazon-opensearch-through-nginx-6b26dff87fc3?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b26dff87fc3</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[okta]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[kibana]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Fri, 22 Oct 2021 07:06:14 GMT</pubDate>
            <atom:updated>2021-10-22T07:06:14.872Z</atom:updated>
            <content:encoded><![CDATA[<p>OKTA integration with VPC-based Amazon Opensearch through Nginx</p><h3>Amazon Opensearch setup</h3><p>Enable SAML authentication</p><ul><li>fill in <strong>IdP metadata</strong></li><li>fill in <strong>IdP entity ID : </strong>you can find it from the okta metadata</li><li>SAML master username: izekchen@gmail.com &lt; ensure the username also exist in the okta application user assignment</li><li>SAML master backend role: create a policy with ES permission and attach to a role, policy example as below</li></ul><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;VisualEditor0&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: &quot;es:*&quot;,<br>            &quot;Resource&quot;: &quot;*&quot;<br>        }<br>    ]<br>}</pre><h3>Nginx Setup</h3><p>You can choose any distribution of linux and have nginx installed<br>And the nginx need to be able to access your opensearch or within the same VPC. You will need the nginx in between to communicate and get the auth done</p><p>Generate self-signed certificate</p><pre>openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt</pre><p>Nginx.conf</p><pre>server {<br>    listen 443 ssl;<br>    server_name $HOST;<br>    rewrite ^/$ https://$HOST/_plugin/kibana redirect;<br><br>    ssl_certificate           /etc/nginx/cert.crt;<br>    ssl_certificate_key       /etc/nginx/cert.key;<br><br>    ssl_session_cache  builtin:1000  shared:SSL:10m;<br>    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;<br>    ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;<br>    ssl_prefer_server_ciphers on;<br><br><br>    location ^~ /_plugin/kibana {<br>        # Forward requests to Kibana<br>        proxy_pass https://vpc-test-domain-xxxxxxxxxxx.us-east-1.es.amazonaws.com/_plugin/kibana;<br><br>        # Handle redirects to Amazon ES<br>        proxy_redirect https://vpc-test-domain-xxxxxxxxxx.us-east-1.es.amazonaws.com https://$HOST;<br><br>        # Update cookie domain and path<br>        proxy_cookie_domain https://vpc-test-domain-xxxxxxxx.us-east-1.es.amazonaws.com $HOST;<br>    proxy_cookie_path / /_plugin/kibana/;<br><br>        proxy_set_header Accept-Encoding &quot;&quot;;<br>        sub_filter_types *;<br>        sub_filter https://vpc-test-domain-xxxxxxxxxx.us-east-1.es.amazonaws.com $HOST;<br>        sub_filter_once off;<br><br>    proxy_buffering off;<br>        # Response buffer settings<br>        proxy_buffer_size 128k;<br>        proxy_buffers 4 256k;<br>        proxy_busy_buffers_size 256k;<br>    }<br><br>    location ~ \/(log|sign|error|fav|forgot|change|confirm) {<br><br>        # Forward requests to ES<br>        proxy_pass https://vpc-test-domain-xxxxxxxxxx.us-east-1.es.amazonaws.com;<br><br>        # Handle redirects to Kibana<br>        proxy_redirect https://vpc-test-domain-xxxxxxxxx.us-east-1.es.amazonaws.com https://$HOST;<br><br>        # Handle redirects to Amazon ES<br>        proxy_redirect https://vpc-test-domain-xxxxxxxxxx.us-east-1.es.amazonaws.com https://$HOST;<br><br>        # Update cookie domain<br>        proxy_cookie_domain vpc-test-domain-xxxxxxxxx.us-east-1.es.amazonaws.com $HOST;<br>    }<br>}</pre><p>After the steps above, you can start the nginx service</p><pre>systemctl start nginx</pre><h3><strong>Setup Route53 Record</strong></h3><p>Create a DNS record and point to the EC2</p><h3>Setup OKTA IDP configuration</h3><p><strong>Single Sign On URL</strong>: using the URL that point to your EC2<br><strong>Recipient and Destination URL:</strong> using the Kibana URL that start with vpc<br><strong>Audience Restriction</strong>: using the ES url with be careful that you cannot have a slash(“<strong>/</strong>”) at the end</p><ul><li>Single Sign On URL - https://&lt;PROXY_HOST&gt;/_plugin/kibana/_opendistro/_security/saml/acs</li><li>Recipient URL - https://&lt;ES_ENDPOINT&gt;/_plugin/kibana/_opendistro/_security/saml/acs</li><li>Destination URL - https://&lt;ES_ENDPOINT&gt;/_plugin/kibana/_opendistro/_security/saml/acs</li><li>Audience Restriction - https://&lt;ES_ENDPOINT&gt;</li></ul><pre>Single Sign On URL<br>    https://kibana..mydoamin.com/_plugin/kibana/_opendistro/_security/saml/acs<br>Recipient URL<br>    https://vpc-test-domain-xxxxxxxxxxxx.us-east-1.es.amazonaws.com/_plugin/kibana/_opendistro/_security/saml/acs<br>Destination URL<br>    https://vpc-test-domain-xxxxxxxxxxx.us-east-1.es.amazonaws.com/_plugin/kibana/_opendistro/_security/saml/acs<br>Audience Restriction<br>   https://vpc-test-domain-xxxxxxxxxxx.us-east-1.es.amazonaws.com    &lt;-----------注意最後不能有slash(&quot;/&quot;)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b26dff87fc3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyze mongodb3.x slow query log with filebeat and elasticsearch]]></title>
            <link>https://izekchen.medium.com/analyze-mongodb3-x-slow-query-log-with-filebeat-and-elasticsearch-55782fe81014?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/55782fe81014</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[performance-tuning]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Tue, 15 Jun 2021 12:37:05 GMT</pubDate>
            <atom:updated>2021-06-15T12:37:05.936Z</atom:updated>
            <content:encoded><![CDATA[<p>The log format for MongoDB v.3.x compare with later version are very different. And it is not working with default filebeat pipeline. However, there is a way we can parse it</p><h4>Default filebeat mongodb pipeline</h4><p>The grok part below are not working in the old version of mongodb logs</p><p>log example:</p><pre>{ aggregate: &quot;orders&quot;, pipeline: [ { $match: { items._profiles.type: &quot;sale&quot;, items._profiles.Id: ObjectId(&#39;xxxxxxxx&#39;), createdAt: { $gte: new Date(1483203600000), $lt: new Date(1623776399999) } } }, { $unwind: &quot;$items&quot; }, { $unwind: &quot;$items._profiles&quot; }, { $match: { items._profiles.type: &quot;sale&quot;, items._profiles.Id: ObjectId(&#39;xxxxxxxxxx&#39;), createdAt: { $gte: new Date(1483203600000), $lt: new Date(1623776399999) } } }, { $group: { _id: &quot;$_id&quot;, riskScoreByOrder: { $avg: &quot;$_riskScore&quot; } } }, { $group: { _id: 0, avgRiskScore: { $avg: &quot;$riskScoreByOrder&quot; } } } ], allowDiskUse: true, maxTimeMS: 60000, cursor: {}, $readPreference: { mode: &quot;secondaryPreferred&quot; }, $db: &quot;testDB&quot; } planSummary: IXSCAN { items._profiles.Id: 1, items._profiles.type: 1, createdAt: -1 } keysExamined:120572 docsExamined:120518 cursorExhausted:1 numYields:1039 nreturned:1 reslen:283 locks:{ Global: { acquireCount: { r: 2308 }, acquireWaitCount: { r: 1017 }, timeAcquiringMicros: { r: 11453345 } }, Database: { acquireCount: { r: 1154 } }, Collection: { acquireCount: { r: 1154 } } }</pre><p>pipeline:</p><pre>GET _ingest/pipeline/filebeat-7.13.2-mongodb-log-pipeline<br>{<br>  &quot;filebeat-7.13.2-mongodb-log-pipeline&quot; : {<br>    &quot;description&quot; : &quot;Pipeline for parsing MongoDB logs&quot;,<br>    &quot;processors&quot; : [<br>      {<br>        &quot;set&quot; : {<br>          &quot;field&quot; : &quot;event.ingested&quot;,<br>          &quot;value&quot; : &quot;{{_ingest.timestamp}}&quot;<br>        }<br>      },<br>      {<br>        &quot;grok&quot; : {<br>          &quot;ignore_missing&quot; : true,<br>          &quot;field&quot; : &quot;message&quot;,<br>          &quot;patterns&quot; : [<br>            &quot;&quot;&quot;%{TIMESTAMP_ISO8601:mongodb.log.timestamp}%{SPACE}%{MONGO3_SEVERITY:log.level}%{SPACE}%{MONGO3_COMPONENT:mongodb.log.component}%{SPACE}(?:\[%{DATA:mongodb.log.context}\])?%{SPACE}%{GREEDYDATA:message}&quot;&quot;&quot;<br>          ]<br>        }<br>      },<br>      {<br>        &quot;rename&quot; : {<br>          &quot;field&quot; : &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot;,<br>          &quot;target_field&quot; : &quot;event.created&quot;<br>        }<br>      },<br>      {<br>        &quot;date&quot; : {<br>          &quot;field&quot; : &quot;mongodb.log.timestamp&quot;,<br>          &quot;target_field&quot; : &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot;,<br>          &quot;formats&quot; : [<br>            &quot;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZZ&quot;<br>          ]<br>        }<br>      },<br>      ...<br>    ],<br>    &quot;on_failure&quot; : [<br>      {<br>        &quot;set&quot; : {<br>          &quot;field&quot; : &quot;error.message&quot;,<br>          &quot;value&quot; : &quot;{{ _ingest.on_failure_message }}&quot;<br>        }<br>      }<br>    ]<br>  }<br>}</pre><h4>Custom pipeline</h4><p>We can copy the official pipeline and create a custom one with extra grok to easy parsing the data.</p><p>Added one grok and one convert to change the time_taken to interger</p><pre>PUT _ingest/pipeline/mongodb-log-pipeline-custom<br>{<br>  &quot;description&quot;: &quot;Pipeline for parsing MongoDB logs&quot;,<br>  &quot;processors&quot;: [<br>    {<br>      &quot;set&quot;: {<br>        &quot;field&quot;: &quot;event.ingested&quot;,<br>        &quot;value&quot;: &quot;{{_ingest.timestamp}}&quot;<br>      }<br>    },<br>    {<br>      &quot;grok&quot;: {<br>        &quot;ignore_missing&quot;: true,<br>        &quot;field&quot;: &quot;message&quot;,<br>        &quot;patterns&quot;: [<br>          &quot;&quot;&quot;(-|%{WORD:severity}\:\s%{GREEDYDATA:details}\s+)command\s+%{GREEDYDATA:database}\.%{GREEDYDATA:collection}\s+command:\s+%{WORD:command_type}\s+%{GREEDYDATA:mongo_query}\s+protocol:%{GREEDYDATA:protocal}\s%{GREEDYDATA:time_taken}ms&quot;&quot;&quot;,<br>          &quot;&quot;&quot;command\s+%{GREEDYDATA:database}\.%{GREEDYDATA:collection}\s+command:\s+%{WORD:command_type}\s+%{GREEDYDATA:mongo_query}\s+protocol:%{GREEDYDATA:protocal}\s%{GREEDYDATA:time_taken}ms&quot;&quot;&quot;<br>        ]<br>      }<br>    },<br>    ...,<br>    {<br>      &quot;convert&quot;: {<br>        &quot;field&quot;: &quot;time_taken&quot;,<br>        &quot;type&quot;: &quot;integer&quot;<br>      }<br>    }<br>  ],<br>  &quot;on_failure&quot;: [<br>    {<br>      &quot;set&quot;: {<br>        &quot;field&quot;: &quot;error.message&quot;,<br>        &quot;value&quot;: &quot;{{ _ingest.on_failure_message }}&quot;<br>      }<br>    }<br>  ]<br>}</pre><h4>Modify filebeat module</h4><p>add the custom pipeline to the mongodb module</p><pre>- module: mongodb<br>  # All logs<br>  log:<br>    enabled: true<br>    var.paths: [&quot;/var/log/mongodb/mongod.log&quot;]<br>    input:<br>      pipeline: mongodb-log-pipeline-custom</pre><h4>Grafana + Elasticsearch graph</h4><p>At the end, you can use the graph to quickly find out the slow query and monitor the trend</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hoggGqlJ4wZWyFk2ZTRCOA.png" /></figure><h4>MongoDB Slow query determination</h4><p>TBC</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55782fe81014" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elastic APM and OpenTelemetry integration]]></title>
            <link>https://faun.pub/elastic-apm-and-opentelemetry-integration-49abaaccdad9?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/49abaaccdad9</guid>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Thu, 22 Apr 2021 09:10:55 GMT</pubDate>
            <atom:updated>2021-04-23T11:20:37.852Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>OpenTelemetry Integration</strong></h3><p>OpenTelemetry is a set of APIs, SDKs, tooling, and integrations that enable the capture and management of telemetry data from your services for greater observability.<br>Ane Elastic OpenTelemetry integrations allow you to reuse your existing OpenTelemetry Instrumentation to quickly analyze distributed traces and metrics to help you monitor business KPIs and technical components with the Elastic Stack.</p><h3><strong>Elastic exporter with OpenTelemetry collector Architecture</strong></h3><p>From the recommendation, We will use the “contrib” OpenTelemetry collector by adding an Elastic exporter so that we can plug the integration into our APM setup</p><figure><img alt="https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic.html" src="https://cdn-images-1.medium.com/max/1024/1*ZbkJdJUyD9pIDnr0NfLfcA.png" /><figcaption>Refer from Elastic Official Document</figcaption></figure><h3><strong>Prove of Concept</strong></h3><p><strong>Requirement component:</strong></p><ul><li>Elasticsearch and Kibana</li><li>Elastic APM Server from ECK</li><li>OpenTelemetry Collector</li><li>Application with OpenTelemetry instruction</li></ul><p><strong>Elasticsearch and Kibana</strong></p><p>I will skip this part, you can check my <a href="https://izekchen.medium.com/step-by-step-installation-for-elasticsearch-operator-on-kubernetes-and-metircbeat-filebeat-and-67a6ec4931fb">Step By Step Post</a> for further information</p><p><strong>Elastic APM Server from ECK setup</strong></p><p>We will skip the ECK operator setup here. If you have any question, you can check my <a href="https://izekchen.medium.com/step-by-step-installation-for-elasticsearch-operator-on-kubernetes-and-metircbeat-filebeat-and-67a6ec4931fb">Step By Step Post</a></p><p><strong>Elastic APM Server</strong></p><pre>apiVersion: apm.k8s.elastic.co/v1<br>kind: ApmServer<br>metadata:<br>  name: apm-server-staging<br>  namespace: elastic-apm<br>spec:<br>  version: 7.12.0 ### define the version<br>  count: 1<br>  http:   <br>    tls:<br>      selfSignedCertificate:  ### disable tls will be easy for test<br>        disabled: true        ### not recommend for production<br>  config:<br>    apm-server:<br>      capture_personal_data: true<br>    instrumentation:<br>      enabled: true<br>    output:<br>      elasticsearch:<br>        hosts: [&quot;YOUR-ES-URL:9200&quot;]<br>    logging.level: info ### enable logging for debug<br>    logging.to_stderr: true ### output error if any<br>    logging.metrics.enabled: true</pre><p>To get the APM Server token, run the command</p><pre>kubectl get secret/apm-server-staging-apm-token -o go-template=&#39;{{index .data &quot;secret-token&quot; | base64decode}}&#39; -n elastic-apm</pre><p><strong>OpenTelemetry Collector</strong></p><p>There are ConfigMap for your collector config, Deployment and service.</p><p>In <strong>config.yaml, </strong>you can enable both <strong>grpc</strong> and <strong>http</strong> for receiving data from your application and <strong>hostmetrics </strong>for host metrics (CPU/Memory/load)</p><p>At <strong>exporter</strong> part, you only need exporter for ES output and would recommend enable <strong>logging</strong> with <strong>Debug</strong> level use well since you are running this in kubernetes</p><pre>---<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: otel-collector-config<br>data:<br>  config.yaml: |-<br>    receivers:<br>      otlp:<br>        protocols:<br>          grpc:<br>            endpoint: 0.0.0.0:55680<br>          http:<br>            endpoint: 0.0.0.0:55681<br>      hostmetrics:<br>        collection_interval: 1m<br>        scrapers:<br>          cpu:<br>          load:<br>          memory:<br>    processors:<br>      batch: null<br>    exporters:<br>      elastic:<br>        apm_server_url: &#39;<a href="http://apm-server-staging-apm-http.elastic-apm.svc.cluster.local:8200&#39;">http://apm-server-staging-apm-http.elastic-apm.svc.cluster.local:8200&#39;</a><br>        secret_token: &#39;XXXXXXXXXXXXXXX&#39;<br>      logging:<br>        loglevel: DEBUG<br>    extensions:<br>      health_check:<br>    service:<br>      pipelines:<br>        metrics:<br>          receivers:<br>            - otlp<br>            - hostmetrics<br>          exporters:<br>            - logging<br>            - elastic<br>        traces:<br>          receivers:<br>            - otlp<br>          processors:<br>            - batch<br>          exporters:<br>            - elastic<br>            - logging<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: otel-collector<br>  labels:<br>    app: opentelemetry<br>    component: otel-collector<br>spec:<br>  selector:<br>    matchLabels:<br>      app: opentelemetry<br>      component: otel-collector<br>  template:<br>    metadata:<br>      labels:<br>        app: opentelemetry<br>        component: otel-collector<br>    spec:<br>      containers:<br>      - name: otel-collector<br>        image: otel/opentelemetry-collector-contrib-dev:latest<br>        resources:<br>          limits:<br>            cpu: 100m<br>            memory: 200Mi<br>          requests:<br>            cpu: 100m<br>            memory: 200Mi<br>        volumeMounts:<br>        - mountPath: /var/log<br>          name: varlog<br>          readOnly: true<br>        - mountPath: /var/lib/docker/containers<br>          name: varlibdockercontainers<br>          readOnly: true<br>        - mountPath: /etc/otel/config.yaml<br>          name: data<br>          subPath: config.yaml<br>          readOnly: true<br>      terminationGracePeriodSeconds: 30<br>      volumes:<br>      - name: varlog<br>        hostPath:<br>          path: /var/log<br>      - name: varlibdockercontainers<br>        hostPath:<br>          path: /var/lib/docker/containers<br>      - name: data<br>        configMap:<br>          name: otel-collector-config</pre><pre>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: otel-collector<br>  labels:<br>    app: opentelemetry<br>    component: otel-collector<br>spec:<br>  ports:<br>  - name: metrics # Default endpoint for querying metrics.<br>    port: 8888<br>  - name: grpc # Default endpoint for OpenTelemetry receiver.<br>    port: 55680<br>    protocol: TCP<br>    targetPort: 55680<br>  - name: http # Default endpoint for OpenTelemetry receiver.<br>    port: 55681<br>    protocol: TCP<br>    targetPort: 55681<br>  selector:<br>    component: otel-collector</pre><h3>Test the solution</h3><p>After all the infra setup are all in place, we can start doing test.<br>I will use the project and make a little bit change to test <br><a href="https://github.com/elastic/apm-contrib/blob/master/opentelemetry/otel-python-backend/server.py">https://github.com/elastic/apm-contrib/blob/master/opentelemetry/otel-python-backend/server.py</a></p><pre># You may obtain a copy of the License at<br>#<br>#     <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br>#<br># Unless required by applicable law or agreed to in writing, software<br># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,<br># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br># See the License for the specific language governing permissions and<br># limitations under the License.</pre><pre>import logging<br>from flask import Flask, request</pre><pre>from opentelemetry import propagators, trace<br>from opentelemetry.exporter.otlp.trace_exporter import OTLPSpanExporter<br>from opentelemetry.instrumentation.flask import FlaskInstrumentor<br>from opentelemetry.sdk.resources import Resource<br>from opentelemetry.sdk.trace import TracerProvider<br>from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor</pre><pre>logging.basicConfig(level=logging.DEBUG)</pre><pre>app = Flask(__name__)</pre><pre>FlaskInstrumentor().instrument_app(app)</pre><pre>tracer_provider = TracerProvider(resource=Resource.create({&quot;service.name&quot;: &quot;backend&quot;}))<br>tracer_provider.add_span_processor(<br>    SimpleExportSpanProcessor(OTLPSpanExporter(endpoint=&quot;localhost:55680&quot;))<br>)<br>trace.set_tracer_provider(tracer_provider)</pre><pre><a href="http://twitter.com/app">@app</a>.route(&quot;/backend&quot;)<br>def server_request():<br>    return &quot;served&quot;</pre><pre><a href="http://twitter.com/app">@app</a>.route(&quot;/testing&quot;)<br>def server_request1():<br>    return &quot;izek testing&quot;</pre><pre>if __name__ == &quot;__main__&quot;:<br>    app.run(host=&quot;0.0.0.0&quot;, port=8081)</pre><p><strong>First you need to create a port forward from you kubernetes</strong></p><pre>kubectl port-forward service/otel-collector 55680:55680 55681:55681 -n elastic-apm</pre><p>Next, you can run the application and hit the link <a href="http://localhost:8081/backend">http://localhost:8081/backend</a> and you will see the result on ES</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yeujKkaHePZbuiozVBcsNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xWWMK8AqrXTH8JjbkozQNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p>👋 <a href="https://faun.dev/join"><strong>Join FAUN today and receive similar stories each week in your inbox!</strong></a><strong> </strong>️ <strong>Get your weekly dose of the must-read tech stories, news, and tutorials.</strong></p><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬</p><figure><a href="https://www.faun.dev/join?utm_source=medium.com/faun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cT0_laE4iPcqW1qrbstAg.gif" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49abaaccdad9" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/elastic-apm-and-opentelemetry-integration-49abaaccdad9">Elastic APM and OpenTelemetry integration</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Replace httpGet with exec for readiness and liveness probe]]></title>
            <link>https://izekchen.medium.com/replace-httpget-with-exec-for-readiness-and-liveness-probe-2c70f061b2ec?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c70f061b2ec</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[livenessprobe]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[readinessprobe]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Mon, 25 Jan 2021 03:16:16 GMT</pubDate>
            <atom:updated>2021-01-25T03:16:16.743Z</atom:updated>
            <content:encoded><![CDATA[<p>There have been quite a few issue for using httpGet for both Probe<br>keep showing unreasonable timeout</p><pre>net/http: request canceled (Client.Timeout exceeded while awaiting headers)</pre><p>After some investigation, I switched to exec with no issue</p><pre>readinessProbe:<br>#    httpGet:<br>#      path: &quot;/_node/ready&quot;<br>#      port: 9600<br>    exec:<br>      command:<br>        - &quot;curl&quot;<br>        - &quot;--fail&quot;<br>        - &quot;http://localhost:9600/_node/ready&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c70f061b2ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Filebeat with nginx custom log format set up]]></title>
            <link>https://izekchen.medium.com/filebeat-with-nginx-custom-log-format-set-up-a17d5bde38d4?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a17d5bde38d4</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[beats]]></category>
            <category><![CDATA[filebeat]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Tue, 15 Sep 2020 07:15:37 GMT</pubDate>
            <atom:updated>2020-09-15T07:15:37.239Z</atom:updated>
            <content:encoded><![CDATA[<h3>Background</h3><p>For setting up the custom Nginx log parsing, there are something areas you need to pay attention to. When filebeat start, it will initiate a PUT request to elasticsearch to create or update the default pipeline. For Ex, “filebeat-7.7.1-nginx-access-default“ is the default pipeline of filebeat 7.7.1.<br>If you have multiple version of filebeat, then you will have lots of version of pipelines<br>But when you only use one version of filebeat with multiple version of Nginx, then things got tricky. The black hole we fall in is that we have default filebeat running on several production env and we try to test the customize logs on the staging server. We run the command and forced to use Nginx module.</p><p>We didn’t notice that it overwrite the pipeline already with the custom default.json file and spend tons of time stuck in how is that happened.</p><h3>Procedure</h3><p>Actually, the procedure is pretty straightforward</p><ol><li>Modify Nginx custom log format</li></ol><pre>log_format auth_password_log &#39;$remote_addr  $env_final - $http_authorization [$time_local] &quot;$request&quot; $status $body_bytes_sent &quot;$http_referer&quot; &quot;$http_user_agent&quot; $upstream_response_time&#39;;</pre><p>2. working on the grok pattern</p><p>(-|%{WORD:http.request.x_environment_id}) is for the $env_final from Nginx logs</p><pre>(%{NGINX_HOST} )?&quot;?(?:%{NGINX_ADDRESS_LIST:nginx.access.remote_ip_list}|%{NOTSPACE:source.address}) (-|%{WORD:http.request.x_environment_id}) - %{DATA:user.name} \[%{HTTPDATE:nginx.access.time}\] &quot;%{DATA:nginx.access.info}&quot; %{NUMBER:http.response.status_code:long} %{NUMBER:http.response.body.bytes:long} &quot;%{DATA:http.request.referrer}&quot; &quot;%{DATA:user_agent.original}&quot; (-|%{NUMBER:http.response.time:float})</pre><p>3. create custom pipeline and update with the pattern</p><ul><li>Get the default pipeline:</li></ul><pre>GET _ingest/pipeline/filebeat-7.7.1-nginx-access-default</pre><ul><li>use the data you get to create a new pipeline</li></ul><pre>PUT _ingest/pipeline/filebeat-pipeline-custom<br>{<br>    &quot;description&quot; : &quot;Pipeline for parsing Nginx access logs. Requires the geoip and user_agent plugins.&quot;,<br>    &quot;processors&quot; : [<br>      {<br>        &quot;grok&quot; : {<br>          &quot;field&quot; : &quot;message&quot;,<br>          &quot;patterns&quot; : [<br>            &quot;&quot;&quot;(%{NGINX_HOST} )?&quot;?(?:%{NGINX_ADDRESS_LIST:nginx.access.remote_ip_list}|%{NOTSPACE:source.address}) (-|%{WORD:http.request.x_environment_id}) - %{DATA:user.name} \[%{HTTPDATE:nginx.access.time}\] &quot;%{DATA:nginx.access.info}&quot; %{NUMBER:http.response.status_code:long} %{NUMBER:http.response.body.bytes:long} &quot;%{DATA:http.request.referrer}&quot; &quot;%{DATA:user_agent.original}&quot; (-|%{NUMBER:http.response.time:float})&quot;&quot;&quot;<br>          ],<br>          &quot;pattern_definitions&quot; : {<br>            &quot;NGINX_HOST&quot; : &quot;(?:%{IP:destination.ip}|%{NGINX_NOTSEPARATOR:destination.domain})(:%{NUMBER:destination.port})?&quot;,<br>            &quot;NGINX_NOTSEPARATOR&quot; : &quot;[^\t ,:]+&quot;,<br>            &quot;NGINX_ADDRESS_LIST&quot; : &quot;&quot;&quot;(?:%{IP}|%{WORD})(&quot;?,?\s*(?:%{IP}|%{WORD}))*&quot;&quot;&quot;<br>          },<br>          &quot;ignore_missing&quot; : true<br>        }<br>      },<br>      {<br>        &quot;grok&quot; : {<br>          &quot;patterns&quot; : [<br>            &quot;%{WORD:http.request.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}&quot;,<br>            &quot;&quot;<br>          ],<br>          &quot;ignore_missing&quot; : true,<br>          &quot;field&quot; : &quot;nginx.access.info&quot;<br>        }<br>      },<br>      {<br>        &quot;remove&quot; : {<br>          &quot;field&quot; : &quot;nginx.access.info&quot;<br>        }<br>      },<br>      {<br>        &quot;split&quot; : {<br>          &quot;field&quot; : &quot;nginx.access.remote_ip_list&quot;,<br>          &quot;separator&quot; : &quot;&quot;&quot;&quot;?,?\s+&quot;&quot;&quot;,<br>          &quot;ignore_missing&quot; : true<br>        }<br>      },<br>      {<br>        &quot;split&quot; : {<br>          &quot;field&quot; : &quot;nginx.access.origin&quot;,<br>          &quot;separator&quot; : &quot;&quot;&quot;&quot;?,?\s+&quot;&quot;&quot;,<br>          &quot;ignore_missing&quot; : true<br>        }<br>      },<br>      {<br>        &quot;set&quot; : {<br>          &quot;value&quot; : &quot;&quot;,<br>          &quot;field&quot; : &quot;source.address&quot;,<br>          &quot;if&quot; : &quot;ctx.source?.address == null&quot;<br>        }<br>      },<br>      {<br>        &quot;script&quot; : {<br>          &quot;source&quot; : &quot;boolean isPrivate(def dot, def ip) { try { StringTokenizer tok = new StringTokenizer(ip, dot); int firstByte = Integer.parseInt(tok.nextToken());       int secondByte = Integer.parseInt(tok.nextToken());       if (firstByte == 10) {         return true;       }       if (firstByte == 192 &amp;&amp; secondByte == 168) {         return true;       }       if (firstByte == 172 &amp;&amp; secondByte &gt;= 16 &amp;&amp; secondByte &lt;= 31) {         return true;       }       if (firstByte == 127) {         return true;       }       return false;     } catch (Exception e) {       return false;     }   }   try {    ctx.source.address = null;    if (ctx.nginx.access.remote_ip_list == null) { return; }    def found = false;    for (def item : ctx.nginx.access.remote_ip_list) {        if (!isPrivate(params.dot, item)) {            ctx.source.address = item;            found = true;            break;        }    }    if (!found) {     ctx.source.address = ctx.nginx.access.remote_ip_list[0];   }} catch (Exception e) { ctx.source.address = null; }&quot;,<br>          &quot;params&quot; : {<br>            &quot;dot&quot; : &quot;.&quot;<br>          },<br>          &quot;if&quot; : &quot;ctx.nginx?.access?.remote_ip_list != null &amp;&amp; ctx.nginx.access.remote_ip_list.length &gt; 0&quot;,<br>          &quot;lang&quot; : &quot;painless&quot;<br>        }<br>      },<br>      {<br>        &quot;remove&quot; : {<br>          &quot;field&quot; : &quot;source.address&quot;,<br>          &quot;if&quot; : &quot;ctx.source.address == null&quot;<br>        }<br>      },<br>      {<br>        &quot;grok&quot; : {<br>          &quot;field&quot; : &quot;source.address&quot;,<br>          &quot;patterns&quot; : [<br>            &quot;^%{IP:source.ip}$&quot;<br>          ],<br>          &quot;ignore_failure&quot; : true<br>        }<br>      },<br>      {<br>        &quot;remove&quot; : {<br>          &quot;field&quot; : &quot;message&quot;<br>        }<br>      },<br>      {<br>        &quot;rename&quot; : {<br>          &quot;field&quot; : &quot;@timestamp&quot;,<br>          &quot;target_field&quot; : &quot;event.created&quot;<br>        }<br>      },<br>      {<br>        &quot;date&quot; : {<br>          &quot;field&quot; : &quot;nginx.access.time&quot;,<br>          &quot;target_field&quot; : &quot;@timestamp&quot;,<br>          &quot;formats&quot; : [<br>            &quot;dd/MMM/yyyy:H:m:s Z&quot;<br>          ],<br>          &quot;on_failure&quot; : [<br>            {<br>              &quot;append&quot; : {<br>                &quot;field&quot; : &quot;error.message&quot;,<br>                &quot;value&quot; : &quot;{{ _ingest.on_failure_message }}&quot;<br>              }<br>            }<br>          ]<br>        }<br>      },<br>      {<br>        &quot;remove&quot; : {<br>          &quot;field&quot; : &quot;nginx.access.time&quot;<br>        }<br>      },<br>      {<br>        &quot;user_agent&quot; : {<br>          &quot;field&quot; : &quot;user_agent.original&quot;<br>        }<br>      },<br>      {<br>        &quot;geoip&quot; : {<br>          &quot;ignore_missing&quot; : true,<br>          &quot;field&quot; : &quot;source.ip&quot;,<br>          &quot;target_field&quot; : &quot;source.geo&quot;<br>        }<br>      },<br>      {<br>        &quot;geoip&quot; : {<br>          &quot;target_field&quot; : &quot;source.as&quot;,<br>          &quot;properties&quot; : [<br>            &quot;asn&quot;,<br>            &quot;organization_name&quot;<br>          ],<br>          &quot;ignore_missing&quot; : true,<br>          &quot;database_file&quot; : &quot;GeoLite2-ASN.mmdb&quot;,<br>          &quot;field&quot; : &quot;source.ip&quot;<br>        }<br>      },<br>      {<br>        &quot;rename&quot; : {<br>          &quot;field&quot; : &quot;source.as.asn&quot;,<br>          &quot;target_field&quot; : &quot;source.as.number&quot;,<br>          &quot;ignore_missing&quot; : true<br>        }<br>      },<br>      {<br>        &quot;rename&quot; : {<br>          &quot;ignore_missing&quot; : true,<br>          &quot;field&quot; : &quot;source.as.organization_name&quot;,<br>          &quot;target_field&quot; : &quot;source.as.organization.name&quot;<br>        }<br>      }<br>    ],<br>    &quot;on_failure&quot; : [<br>      {<br>        &quot;set&quot; : {<br>          &quot;field&quot; : &quot;error.message&quot;,<br>          &quot;value&quot; : &quot;{{ _ingest.on_failure_message }}&quot;<br>        }<br>      }<br>    ]<br>  <br>}</pre><ul><li>update the nginx.yml in the module.d directory</li></ul><pre>- module: nginx<br>  # Access logs<br>  access:<br>    enabled: true<br>    input:<br>      pipeline: filebeat-pipeline-custom</pre><p>Done</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a17d5bde38d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding Challenge — 2]]></title>
            <link>https://izekchen.medium.com/coding-challenge-2-6d4c7993e591?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d4c7993e591</guid>
            <category><![CDATA[coding-challenge]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[100-days-coding-challenge]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 05:08:11 GMT</pubDate>
            <atom:updated>2020-06-21T05:08:11.152Z</atom:updated>
            <content:encoded><![CDATA[<p>Coding Challenge — 2</p><p>This problem was recently asked by Airbnb</p><p>Given a sorted array, A, with possibly duplicated elements, find the indices of the first and last occurrences of a target element, x. Return -1 if the target is not found.</p><p>Example:</p><pre>Input: A = [1,3,3,5,7,8,9,9,9,15], target = 9<br>Output: [6,8]<br><br>Input: A = [100, 150, 150, 153], target = 150<br>Output: [1,2]<br><br>Input: A = [1,2,3,4,5,6,10], target = 9<br>Output: [-1, -1]</pre><p>Here is a function signature example:</p><pre><strong>class</strong> Solution<strong>:</strong> <br>  <strong>def</strong> getRange<strong>(</strong>self<strong>,</strong> arr<strong>,</strong> target<strong>):</strong><br>    <em># Fill this in.</em><br>  <br><em># Test program </em><br>arr <strong>=</strong> <strong>[1,</strong> <strong>2,</strong> <strong>2,</strong> <strong>2,</strong> <strong>2,</strong> <strong>3,</strong> <strong>4,</strong> <strong>7,</strong> <strong>8,</strong> <strong>8]</strong> <br>x <strong>=</strong> <strong>2</strong><br><strong>print(</strong>Solution<strong>().</strong>getRange<strong>(</strong>arr<strong>,</strong> x<strong>))</strong><br><em># [1, 4]</em></pre><p>Solution:</p><p>Time complexity O(n)</p><pre>class Solution: <br>    def getRange(self, arr, target):<br>        res = [0] * 2<br>        find_first = 0<br>        <br>        for i in range(len(arr)):<br>            if arr[i] == x and find_first == 0:<br>                find_first = 1<br>                res[0] = i<br>            <br>            if arr[i] == x:<br>                res[1] = i</pre><pre>return res</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d4c7993e591" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding Challenge — 1]]></title>
            <link>https://izekchen.medium.com/coding-challenge-1-bb29b6ae49c0?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb29b6ae49c0</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[coding-challenge]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[100-days-coding-challenge]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 03:14:06 GMT</pubDate>
            <atom:updated>2020-06-21T03:14:06.768Z</atom:updated>
            <content:encoded><![CDATA[<p>Coding Challenge — 1</p><p>This problem was recently asked by Google</p><p>Given a list of numbers with only 3 unique numbers (1, 2, 3), sort the list in O(n) time.</p><p>Example 1:</p><pre>Input: [3, 3, 2, 1, 3, 2, 1]<br>Output: [1, 1, 2, 2, 3, 3, 3]</pre><pre><strong>def</strong> sortNums<strong>(</strong>nums<strong>):</strong><br>  <em># Fill this in.</em></pre><pre><strong>print</strong> sortNums<strong>([3,</strong> <strong>3,</strong> <strong>2,</strong> <strong>1,</strong> <strong>3,</strong> <strong>2,</strong> <strong>1])</strong><br><em># [1, 1, 2, 2, 3, 3, 3]</em></pre><p>Challenge: Try sorting the list using constant space.</p><p>Solution1:</p><pre>def sortNums(nums):<br>    #print(nums)<br>    a = 0<br>    b = 0<br>    c = 0</pre><pre>for i in nums:<br>        if i == 1:<br>            a += 1<br>        elif i == 2:<br>            b += 1<br>        else:<br>            c += 1<br>    <br>    return [1] * a + [2] * b + [3] * c</pre><pre>print(sortNums([3, 3, 2, 1, 3, 2, 1]))<br># [1, 1, 2, 2, 3, 3, 3]</pre><p>Solution2:</p><p>The time complexity of O(n), the space complexity is O(1)</p><pre>def sortNums(nums):<br>    one_idx = 0<br>    three_idx = len(nums) - 1<br>    idx = 0</pre><pre>while idx &lt; three_idx:<br>        if nums[idx] == 1:<br>            nums[idx], nums[one_idx] = nums[one_idx], nums[idx]<br>            idx += 1<br>            one_idx += 1<br>        elif nums[idx] == 2:<br>            idx += 1<br>        else:<br>            nums[idx], nums[three_idx] = nums[three_idx], nums[idx]<br>            three_idx -= 1<br>    <br>    return nums</pre><pre>print(sortNums([3, 3, 2, 1, 3, 2, 1]))<br># [1, 1, 2, 2, 3, 3, 3]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb29b6ae49c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uptime Host Availability - Hand-on Elastic Heartbeat Setup And Watcher alerting Combination]]></title>
            <link>https://faun.pub/uptime-host-availability-hand-on-elastic-heartbeat-setup-and-watcher-alerting-combination-1002f183a6b0?source=rss-1e2db57d473c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1002f183a6b0</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[observation]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Izek Chen]]></dc:creator>
            <pubDate>Tue, 03 Mar 2020 15:54:56 GMT</pubDate>
            <atom:updated>2020-03-04T11:08:11.692Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Uptime Host Availability -</strong> Hand-on Elastic Heartbeat Setup And Watcher alerting Combination</p><p>Heartbeat is a lightweight daemon that you install on a remote server to periodically check the status of your services and determine whether they are available. Unlike <a href="https://www.elastic.co/guide/en/beats/metricbeat/7.1/index.html">Metricbeat</a>, which only tells you if your servers are up or down, Heartbeat tells you whether your services are reachable.</p><p>Heartbeat is useful when you need to verify that you’re meeting your service level agreements for service uptime. It’s also useful for other scenarios, such as security use cases when you need to verify that no one from the outside can access services on your private enterprise server.</p><p>You can configure Heartbeat to ping all DNS-resolvable IP addresses for a specified hostname. That way, you can check all services that are load-balanced to see if they are available.</p><p>When you configure Heartbeat, you specify monitors that identify the hostnames that you want to check. Each monitor runs based on the schedule that you specify. For example, you can configure one monitor to run every 10 minutes, and a different monitor to run between the hours of 9:00 and 17:00.</p><p>Heartbeat currently supports monitors for checking hosts or endpoint via:</p><ul><li>ICMP (v4 and v6) Echo Requests. Use the icmp monitor when you simply want to check whether a service is available. This monitor requires root access.</li><li>TCP. Use the tcp monitor to connect via TCP. You can optionally configure this monitor to verify the endpoint by sending and/or receiving a custom payload.</li><li>HTTP. Use the http monitor to connect via HTTP. You can optionally configure this monitor to verify that the service returns the expected response, such as a specific status code, response header, or content.</li></ul><p>Below I will show you how the magic is</p><ol><li>Heartbeat installation:<br>I will skip the heartbeat installation here. You can refer to the <a href="https://www.elastic.co/guide/en/beats/heartbeat/current/heartbeat-installation.html">page</a>.</li></ol><p>2. Heartbeat monitor: look at the example closely and you will find that I have set up a few fields there like env, tags, team, etc. That is the magical part of monitoring. We will talk about it more at a later step.</p><pre>#HTTP example<br>#Check if url response 200<br>---<br>- type: http<br>  schedule: &#39;<a href="http://twitter.com/every">@every</a> 60s&#39;<br>  urls: [<br>      &quot;<a href="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png</a>&quot;<br>  ]<br>  check.response.status: 200<br>  fields:<br>      env: Production<br>      tags: image<br>      site: UK<br>      team: TeamA<br>      issue: page is unreachable<br>  fields_under_root: true</pre><pre>---</pre><pre>#TCP example<br>#Check if Port is open <br>#You can setup multiple hosts and ports<br>---<br>- type: tcp<br>  schedule: &#39;<a href="http://twitter.com/every">@every</a> 60s&#39;<br>  hosts: [<br>    &quot;host1&quot;,<br>    &quot;host2&quot;<br>  ]<br>  ports: [4369, 5672, 15672, 25672]<br>  ipv4: true<br>  mode: any<br>  timeout: 16s<br>  fields:<br>    env: Production<br>    tags: RabbitMQ<br>    site: USA<br>  fields_under_root: true</pre><p>After heartbeat is up and running, you can check the detail from Uptime view and data structure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IcrcRnvb9DUhu2iYC50Z-w.png" /><figcaption>Testing view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IqnP5qPEzKX0WBDdopcaUQ.png" /><figcaption>Data view with all the fields</figcaption></figure><p>3. Setup watcher to generate alert for notification, the key point is that using top_hits aggregation to bring more details, then use the field you bring in for the alerts</p><pre># Http monitor alert rule example<br>PUT _watcher/watch/heartbeat-http-monitor-test<br>{<br>  &quot;trigger&quot;: {<br>    &quot;schedule&quot;: {<br>      &quot;interval&quot;: &quot;1m&quot;<br>    }<br>  },<br>  &quot;input&quot;: {<br>    &quot;search&quot;: {<br>      &quot;request&quot;: {<br>        &quot;search_type&quot;: &quot;query_then_fetch&quot;,<br>        &quot;indices&quot;: [<br>          &quot;&lt;heartbeat-*&gt;&quot;<br>        ],<br>        &quot;body&quot;: {<br>          &quot;size&quot;: 1,<br>          &quot;query&quot;: {<br>            &quot;bool&quot;: {<br>              &quot;must&quot;: [<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;monitor.status&quot;: {<br>                      &quot;value&quot;: &quot;down&quot;<br>                    }<br>                  }<br>                },<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;monitor.type&quot;: {<br>                      &quot;value&quot;: &quot;http&quot;<br>                    }<br>                  }<br>                },<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;env&quot;: {<br>                      &quot;value&quot;: &quot;Production&quot;<br>                    }<br>                  }<br>                }<br>              ],<br>              &quot;filter&quot;: {<br>                &quot;range&quot;: {<br>                  &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot;: {<br>                    &quot;lte&quot;: &quot;now&quot;,<br>                    &quot;gte&quot;: &quot;now-5m&quot;<br>                  }<br>                }<br>              }<br>            }<br>          },<br>          &quot;aggs&quot;: {<br>            &quot;host&quot;: {<br>              &quot;terms&quot;: {<br>                &quot;field&quot;: &quot;url.domain&quot;,<br>                &quot;size&quot;: 10<br>              },<br>              &quot;aggs&quot;: {<br>                <strong>### using top_hits aggregation more details for generating alert</strong><br>                &quot;top_hits&quot;: {<br>                  &quot;top_hits&quot;: {<br>                    &quot;size&quot;: 1,<br>                    &quot;_source&quot;: {<br>                      &quot;includes&quot;: [<br>                        &quot;error&quot;,<br>                        &quot;http&quot;,<br>                        &quot;agent.hostname&quot;,<br>                        &quot;monitor&quot;,<br>                        &quot;sd&quot;,<br>                        &quot;issue&quot;,<br>                        &quot;team&quot;,<br>                        &quot;url&quot;,<br>                        &quot;sd&quot;,<br>                        &quot;site&quot;,<br>                        &quot;env&quot;<br>                      ]<br>                    }<br>                  }<br>                }<br>              }<br>            }<br>          }<br>        }<br>      }<br>    }<br>  },<br>  &quot;condition&quot;: {<br>    &quot;script&quot;: {<br>      &quot;source&quot;: &quot;return ctx.payload.hits.total &gt; params.threshold&quot;,<br>      &quot;lang&quot;: &quot;painless&quot;,<br>      &quot;params&quot;: {<br>        &quot;threshold&quot;: 0<br>      }<br>    }<br>  },<br>  &quot;actions&quot;: {<br>    &quot;index_payload&quot;: {<br>      &quot;transform&quot;: {<br>        &quot;script&quot;: {<br>          &quot;source&quot;: &quot;&quot;&quot;<br>            def docs = []; <br>            def hits = ctx.payload.aggregations.host.buckets; <br>            def df = new DecimalFormat(&#39;##.###&#39;);<br>            def threshold = 5;<br>            def response_code = 0;<br>            for (hit in hits)<br>            {<br>              def x =  hit.top_hits.hits.hits.0._source;<br>              def error_type = x.error.type;<br>              def error_message = x.error.message;<br>              def port = x.url.port;<br>              def url = x.url.full;<br>              def beat_host = x.agent.hostname;<br>              def protocol = x.monitor.type;<br>              def ip = x.monitor.ip;<br>              def host = x.url.domain;<br>              def status = x.monitor.status;<br>              def host_id = x.monitor.id;<br>              def issue = x.issue;<br>              def supportowner;<br>              <br>              if (x.monitor.response_code != null){<br>                response_code = x.monitor.response_code;<br>              }</pre><pre>if ( issue == null ) {<br>                issue = &#39;http test fail on target&#39;;<br>              }</pre><pre>if (x.team != null) {<br>                supportowner = x.team;<br>              } else {<br>                supportowner = &quot;TEAM-global&quot;;<br>              }<br>              <br>              def document = [<br>                    &#39;_id&#39;: host + &#39;!&#39; + protocol,<br>                    &#39;id&#39;: host + &#39;!&#39; + protocol,<br>                    &#39;<a href="http://twitter.com/timestamp">@timestamp</a>&#39;: ctx.execution_time,<br>                    &#39;watcher_interval&#39;:&#39;1m&#39;,<br>                    &#39;cat1&#39;: host,<br>                    &#39;cat2&#39;: &#39;application&#39;,<br>                    &#39;cat3&#39;: &#39;server&#39;,<br>                    &#39;tags&#39;: &#39;watcher&#39;,<br>                    &#39;site&#39;: x.site,<br>                    &#39;env&#39;: x.env,<br>                    &#39;processing_state&#39;: &#39;unprocessed&#39;,<br>                    &#39;alert_source&#39;: &#39;watcher&#39;,<br>                    &#39;issue&#39;: issue,<br>                    &#39;state&#39;: &#39;critical&#39;,<br>                    &#39;supportowner&#39;: supportowner,<br>                    &#39;ip&#39;: x.monitor.ip,<br>                    &#39;error_type&#39;: error_type,<br>                    &#39;description&#39;: error_message,<br>                    &#39;port&#39;: port,<br>                    &#39;url&#39;: url,<br>                    &#39;probe&#39;: beat_host,<br>                    &#39;protocol&#39;: protocol,<br>                    &#39;host&#39;: host,<br>                    &#39;status&#39;: status<br>                    <br>                ];<br>                docs.add(document);<br>            }<br>            return [&#39;_doc&#39;:docs];<br>&quot;&quot;&quot;,<br>          &quot;lang&quot;: &quot;painless&quot;<br>        }<br>      },<br>      &quot;index&quot;: {<br>        &quot;index&quot;: &quot;heartbeat-test&quot; ### write to another index or you can use email/webhook/pagerduty actions<br>      }<br>    }<br>  }<br>}</pre><pre>#TCP example<br>PUT _watcher/watch/heartbeat-port-monitor-test<br>{<br>  &quot;trigger&quot;: {<br>    &quot;schedule&quot;: {<br>      &quot;interval&quot;: &quot;1m&quot;<br>    }<br>  },<br>  &quot;input&quot;: {<br>    &quot;search&quot;: {<br>      &quot;request&quot;: {<br>        &quot;search_type&quot;: &quot;query_then_fetch&quot;,<br>        &quot;indices&quot;: [<br>          &quot;&lt;heartbeat-*&gt;&quot;<br>        ],<br>        &quot;body&quot;: {<br>          &quot;query&quot;: {<br>            &quot;bool&quot;: {<br>              &quot;must&quot;: [<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;monitor.status&quot;: {<br>                      &quot;value&quot;: &quot;down&quot;<br>                    }<br>                  }<br>                },<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;monitor.type&quot;: {<br>                      &quot;value&quot;: &quot;tcp&quot;<br>                    }<br>                  }<br>                },<br>                {<br>                  &quot;term&quot;: {<br>                    &quot;env&quot;: {<br>                      &quot;value&quot;: &quot;Production&quot;<br>                    }<br>                  }<br>                }<br>              ],<br>              &quot;filter&quot;: {<br>                &quot;range&quot;: {<br>                  &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot;: {<br>                    &quot;gte&quot;: &quot;now-5m&quot;,<br>                    &quot;lte&quot;: &quot;now&quot;<br>                  }<br>                }<br>              }<br>            }<br>          }<br>        }<br>      }<br>    }<br>  },<br>  &quot;condition&quot;: {<br>    &quot;script&quot;: {<br>      &quot;source&quot;: &quot;return ctx.payload.hits.total &gt; params.threshold&quot;,<br>      &quot;lang&quot;: &quot;painless&quot;,<br>      &quot;params&quot;: {<br>        &quot;threshold&quot;: 0<br>      }<br>    }<br>  },<br>  &quot;actions&quot;: {<br>    &quot;index_payload&quot;: {<br>      &quot;transform&quot;: {<br>        &quot;script&quot;: {<br>          &quot;source&quot;: &quot;&quot;&quot;<br>            def docs = []; <br>            def hits = ctx.payload.hits.hits; <br>            def supportowner;<br>            for (hit in hits){<br>              def x = hit._source;<br>              <br>              if ( x.team != null ) {<br>                supportowner = x.team;<br>              } else {<br>                supportowner = &quot;Team-global&quot;;<br>              }<br>              def document = [<br>                &#39;id&#39;: &#39;hearbeat-monitoring&#39; + &#39;!!&#39; + x[&#39;tags&#39;][0] + &#39;-&#39;+x[&#39;url&#39;][&#39;domain&#39;]+&#39;-&#39;+x[&#39;url&#39;][&#39;port&#39;],<br>                &#39;watcher_interval&#39;:&#39;1m&#39;,<br>                &#39;<a href="http://twitter.com/timestamp">@timestamp</a>&#39;:ctx.execution_time,<br>                &#39;cat1&#39;:x[&#39;url&#39;][&#39;domain&#39;],<br>                &#39;cat2&#39;: x[&#39;tags&#39;][0],<br>                &#39;cat3&#39;: &#39;hearbeat-monitoring&#39;,<br>                &#39;tags&#39;: &#39;watcher&#39;,<br>                &#39;type&#39;: &#39;watcher&#39;,<br>                &#39;site&#39;: x.site,<br>                &#39;env&#39;: x.env,<br>                &#39;processing_state&#39;: &#39;unprocessed&#39;,<br>                &#39;alert_source&#39;: &#39;watcher&#39;,<br>                &#39;state&#39;: &#39;critical&#39;,<br>                &#39;support_owner&#39;: supportowner,<br>                &#39;description&#39;: x[&#39;error&#39;][&#39;message&#39;],<br>                &#39;host&#39;: x[&#39;url&#39;][&#39;domain&#39;],<br>                &#39;heartbeat_type&#39;: x[&#39;monitor&#39;][&#39;type&#39;],<br>                &#39;heartbeat_status&#39;: x[&#39;monitor&#39;][&#39;status&#39;],<br>                &#39;heartbeat_port&#39;: x[&#39;url&#39;][&#39;port&#39;],<br>                &#39;issue&#39;:&#39;port:&#39;+x[&#39;url&#39;][&#39;port&#39;] + &#39; check failed on &#39; + x[&#39;tags&#39;][0] + &#39;!service&#39; <br>                ];<br>              docs.add(document);<br>            }<br>            return [&#39;_doc&#39;:docs];<br>            &quot;&quot;&quot;,<br>          &quot;lang&quot;: &quot;painless&quot;<br>        }<br>      },<br>      &quot;index&quot;: {<br>        &quot;index&quot;: &quot;heartbeat-test&quot;<br>      }<br>    }<br>  }<br>}</pre><p>4. In the end, you will have the beautiful alert with all the details you need. Your on-call engineer will be very happy for having such riches alerts. And the amazing thing is that you can minimize the time for finding out the issue is.</p><pre>#http alert<br>---<br>{<br>      &quot;issue&quot; : &quot;page is unreachable&quot;,<br>      &quot;ip&quot; : null,<br>      &quot;description&quot; : &quot;lookup <a href="http://www.testabcdomain.com.uk/">www.testabcdomain.com.uk</a> on 10.123.0.11:53: no such host&quot;,<br>      &quot;env&quot; : &quot;Production&quot;,<br>      &quot;processing_state&quot; : &quot;unprocessed&quot;,<br>      &quot;url&quot; : &quot;<a href="https://www.testabcdomain.com.uk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">https://www.testabcdomain.com.uk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png</a>&quot;,<br>      &quot;tags&quot; : &quot;watcher&quot;,<br>      &quot;probe&quot; : &quot;server1&quot;,<br>      &quot;cat2&quot; : &quot;application&quot;,<br>      &quot;site&quot; : &quot;Asia&quot;,<br>      &quot;protocol&quot; : &quot;http&quot;,<br>      &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot; : &quot;2020-03-03T15:35:12.132341Z&quot;,<br>      &quot;watcher_interval&quot; : &quot;1m&quot;,<br>      &quot;cat3&quot; : &quot;server&quot;,<br>      &quot;cat1&quot; : &quot;<a href="http://www.testabcdomain.com.uk/">www.testabcdomain.com.uk</a>&quot;,<br>      &quot;port&quot; : 443,<br>      &quot;supportowner&quot; : &quot;TeamC&quot;,<br>      &quot;error_type&quot; : &quot;io&quot;,<br>      &quot;alert_source&quot; : &quot;watcher&quot;,<br>      &quot;host&quot; : &quot;<a href="http://www.testabcdomain.com.uk/">www.testabcdomain.com.uk</a>&quot;,<br>      &quot;id&quot; : &quot;<a href="http://www.testabcdomain.com.uk!http/">www.testabcdomain.com.uk!http</a>&quot;,<br>      &quot;state&quot; : &quot;critical&quot;,<br>      &quot;status&quot; : &quot;down&quot;<br>}</pre><pre>---</pre><pre>#TCP alert</pre><pre>---<br>{<br>      &quot;issue&quot; : &quot;port:5672 check failed on RabbitMQ!service&quot;,<br>      &quot;heartbeat_port&quot; : 5672,<br>      &quot;description&quot; : &quot;lookup host1 on 10.62.4.12:53: server misbehaving&quot;,<br>      &quot;type&quot; : &quot;watcher&quot;,<br>      <strong>&quot;env&quot; : &quot;Production&quot;</strong>,<br>      &quot;processing_state&quot; : &quot;unprocessed&quot;,<br>      &quot;tags&quot; : &quot;watcher&quot;,<br>      &quot;cat2&quot; : &quot;RabbitMQ&quot;,<br>      <strong>&quot;site&quot; : &quot;USA&quot;</strong>,<br>      &quot;support_owner&quot; : &quot;Team-global&quot;,<br>      &quot;watcher_interval&quot; : &quot;1m&quot;,<br>      &quot;<a href="http://twitter.com/timestamp">@timestamp</a>&quot; : &quot;2020-03-03T15:37:21.221559Z&quot;,<br>      &quot;cat3&quot; : &quot;hearbeat-monitoring&quot;,<br>      &quot;cat1&quot; : &quot;host1&quot;,<br>      &quot;alert_source&quot; : &quot;watcher&quot;,<br>      &quot;host&quot; : &quot;host1&quot;,<br>      &quot;id&quot; : &quot;hearbeat-monitoring!!RabbitMQ-host1-5672&quot;,<br>      &quot;state&quot; : &quot;critical&quot;,<br>      &quot;heartbeat_status&quot; : &quot;down&quot;,<br>      &quot;heartbeat_type&quot; : &quot;tcp&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Follow us on </strong><a href="https://twitter.com/joinfaun"><strong>Twitter</strong></a><strong> </strong>🐦<strong> and </strong><a href="https://www.facebook.com/faun.dev/"><strong>Facebook</strong></a><strong> </strong>👥<strong> and </strong><a href="https://instagram.com/fauncommunity/"><strong>Instagram</strong></a><strong> </strong>📷 <strong>and join our </strong><a href="https://www.facebook.com/groups/364904580892967/"><strong>Facebook</strong></a><strong> and </strong><a href="https://www.linkedin.com/company/faundev"><strong>Linkedin</strong></a><strong> Groups </strong>💬<strong>.</strong></p><p><strong>To join our community Slack team chat </strong>🗣️ <strong>read our weekly Faun topics </strong>🗞️,<strong> and connect with the community </strong>📣<strong> click here⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6P3WpLjGv5v1ucm5dgkucg.png" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1002f183a6b0" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/uptime-host-availability-hand-on-elastic-heartbeat-setup-and-watcher-alerting-combination-1002f183a6b0">Uptime Host Availability - Hand-on Elastic Heartbeat Setup And Watcher alerting Combination</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>