<p>We are running Kubernetes 1.9.1.
We are using Kubernetes client python based library script to connect to Kubernetes server and generating some information related to pods like list of pods which r in terminating state currently. We want to send this data to prometheus server as metric and want to raise an alert in prometheus. 
Do I need to create custom metric of prometheus to achieve this?
Alert for prometheus will be created in my python script using prometheus client? </p>

<p>According to <a href="https://prometheus.io/docs/introduction/overview/" rel="nofollow noreferrer">prometheus documentation</a>:</p>

<blockquote>
  <p>Prometheus is a monitoring platform that collects metrics from monitored targets by scraping metrics HTTP endpoints on these targets. </p>
</blockquote>

<p>So - you don't send data to prometheus. You have to expose those data in format readable by prometheus and configure prometheus to scrap it.
If it's not possible - you can push data to prometheus <a href="https://prometheus.io/docs/instrumenting/pushing/" rel="nofollow noreferrer">push gateway</a>.
If you use python client you can use <a href="https://github.com/prometheus/client_python#exporting-to-a-pushgateway" rel="nofollow noreferrer">this code</a> as an example.</p>

<p>You have to define <a href="https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/" rel="nofollow noreferrer">alert rules</a> as part of prometheus configuration. Please note - alerts are not sent by prometheus, but by the alertmanager which is a separate process.</p>
