Are you using the Prometheus Operator? If so, you need to create ServiceMonitor 
objects to tell Prometheus where to look.

If you are just using straight Kubernetes SD, you usually use a label or 
annotation on the pods

On 23 July 2020 17:01:15 BST, vikram yerneni <vikram...@gmail.com> wrote:
>Hi Clark,
>Yes, I had the entire setup and the service discovery is working fine
>in 
>our setups. I used Helm chart deployments on our K8s setups and the
>systems 
>are getting scraped with basic machine level, node level and pod level 
>metrics. 
>However when it comes to application (no exposing issues here.
>Everything 
>is on same K8s Clusters) level custom metrics, this is where Prometheus
>is 
>not scraping by default.  The metrics from those applications are not
>being 
>pumped into the Prometheus server. 
>
>I am guessing scrape_config is the way to configure in Prometheus so
>that 
>the metrics will get pumped in?
>
>Thanks
>Vikram Y
>
>On Thursday, July 23, 2020 at 9:44:07 AM UTC-5, Stuart Clark wrote:
>>
>> On 23/07/2020 15:23, vikram yerneni wrote: 
>> > Fellas, 
>> > I am not a developer, just an engineer. 
>> > I setup our own Prometheus/Grafana Setups and started scraping all 
>> > Node, pod & basic metrics. However the development teams started 
>> > dumping their application level metrics and requesting the
>application 
>> > level metrics to get scraped. 
>> > 
>> > I know, by default Prometheus dont scrape the application level 
>> > metrics and we need to add custom scrape configs for it. 
>> > 
>> > How can I achieve the needed setups here? Looking for basic tips
>here 
>> > fellas. 
>> > 
>> You need to add a job (or jobs) to your prometheus.yaml configuration
>
>> file. 
>>
>> Once key thing is to decide what service discovery (SD) method to
>use. 
>> The simplest but least flexible is the static SD method, but you can 
>> also use Kubernetes or GCP discovery. 
>>
>> Documentation of the scrape configuration can be found at 
>>
>>
>https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
>
>>
>>
>> On the application side they all need to be accessible by the
>Prometheus 
>> server (no load balancer in the way) and expose Prometheus format 
>> metrics via a HTTP or HTTPS port. The easiest way to achieve that is
>to 
>> use one of the many client libraries (Python, Go, Java, etc.) which
>make 
>> the creation of metrics & their publishing fairly easy. 
>>
>>
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Prometheus Users" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to prometheus-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/prometheus-users/b862321d-c629-41e5-9d66-62d82250e1f4o%40googlegroups.com.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/1F656BFA-6C6C-43A8-94E7-D90101F9B8A3%40Jahingo.com.

Reply via email to