You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/12/01 15:24:35 UTC

[GitHub] [solr-operator] koboltmarky commented on issue #483: Servicemonitor for prometheus exporter is referring to cluster port instead of metrics pod port

koboltmarky commented on issue #483:
URL: https://github.com/apache/solr-operator/issues/483#issuecomment-1333934369

   We have the same problem here. We are using the solr-operator 0.6 and prometheus 2.39.1 hosted in gke version 1.21.
   I deployed the solr prometheus exporter with the following snippet:
   
   ```
   apiVersion: solr.apache.org/v1beta1
   kind: SolrPrometheusExporter
   metadata:
     name: solr-prom-exporter
   spec:
     customKubeOptions:
         resources:
           requests:
             cpu: 300m
             memory: 900Mi
     solrReference:
       basicAuthSecret: solr-cloud-k8s-oper-secret 
       cloud:
         name: "apache-solr"
     numThreads: 6
   ```
   
   As you can see in the screenshot prometheus tries to connect to the pod on port 80 which is the wrong port.
   
   
   ![Screenshot from 2022-12-01 16-17-22](https://user-images.githubusercontent.com/8583001/205090598-b500124a-a8d0-410e-a9b3-0950633022db.png)
   
   Our workaround is to add a prometheus scraping annotation to the exporter pod:
   
   ```
   spec:
     customKubeOptions:
       podOptions:
         annotations:
           prometheus.io/port: "8080"
           prometheus.io/path: /metrics
           prometheus.io/scrape: "true"
           prometheus.io/scheme: http
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org