<p>My requirement is to monitor the helpdesk system of the company which is running inside the Kubernetes cluster, for example, URL <a href="https://xyz.zendesk.com" rel="nofollow noreferrer">https://xyz.zendesk.com</a></p>
<p>They provide their <a href="https://developer.zendesk.com/api-reference/status_api/status_api/" rel="nofollow noreferrer">API set</a> to monitor this efficiently.</p>
<p>We can easily check the status using <strong>curl</strong></p>
<pre><code>$ curl -s &quot;https://status.zendesk.com/api/components/support?domain=xyz.zendesk.com&quot; | jq '.active_incidents'
[]
</code></pre>
<p>The above output means success status according to <strong>zendesk</strong> documentation.</p>
<p>Now the main part is, the company uses Prometheus to monitor everything.</p>
<p>How to have Prometheus check the success status from the output of this curl command?.</p>
<p>I did some research already and found somewhat related threads <a href="https://stackoverflow.com/questions/68659153/prometheus-monitoring-command-output-in-container">here</a> and using <a href="https://github.com/prometheus/pushgateway" rel="nofollow noreferrer">pushgateway</a></p>
<p>Are they applicable to my requirement or going in the wrong route?</p>

vjwilson
<p>What you probably (!?) want is something that:</p>
<ol>
<li>Provides an HTTP(s) (e.g. <code>/metrics</code>) endpoint</li>
<li>Producing metrics in Prometheus' exposition format</li>
<li>From Zendesk's API</li>
</ol>
<blockquote>
<p><strong>NOTE</strong> <code>curl</code> only gives you #3</p>
</blockquote>
<p>There are some examples of solutions that appear to meet the requirements but none is from Zendesk:</p>
<p><a href="https://www.google.com/search?q=%22zendesk%22+prometheus+exporter" rel="nofollow noreferrer">https://www.google.com/search?q=%22zendesk%22+prometheus+exporter</a></p>
<p>There are &gt;2 other lists of Prometheus exporters (neither contains Zendesk):</p>
<ul>
<li><a href="https://prometheus.io/docs/instrumenting/exporters/" rel="nofollow noreferrer">https://prometheus.io/docs/instrumenting/exporters/</a></li>
<li><a href="https://github.com/prometheus/prometheus/wiki/Default-port-allocations" rel="nofollow noreferrer">https://github.com/prometheus/prometheus/wiki/Default-port-allocations</a></li>
</ul>
<p>I recommend you contact Zendesk and ask whether there's a Prometheus Exporter already. It's surprising to not find one.</p>
<p>It is straightforward to write a Prometheus Exporter. Prometheus <a href="https://prometheus.io/docs/instrumenting/clientlibs/" rel="nofollow noreferrer">Client libraries</a> and Zendesk <a href="https://developer.zendesk.com/documentation/ticketing/api-clients/introduction/" rel="nofollow noreferrer">API client</a> are available and preferred. While it's possible, bash is probably sub-optimal.</p>
<p>If <strong>all</strong> you want to do is GET that static endpoint, get a 200 response code and confirm that the body is <code>[]</code>, you may be able to use Prometheus <a href="https://github.com/prometheus/blackbox_exporter" rel="nofollow noreferrer">Blackbox exporter</a></p>
<blockquote>
<p><strong>NOTE</strong> Logging and monitoring tools often provide a higher-level tool that provides something analogous to a &quot;universal translator&quot;, facilitating translation from 3rd-party systems' native logging|monitoring formats into some canonical form using config rather than code. Although in the logging space, <a href="https://www.fluentd.org/" rel="nofollow noreferrer">fluentd</a> is an example. To my knowledge, there is no such tool for Prometheus but I sense that there's an opportunity for someone to create one.</p>
</blockquote>
