You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Julien-Fruteau (via GitHub)" <gi...@apache.org> on 2025/02/24 03:39:54 UTC

Re: [I] Monitor Superset Performance [superset]

Julien-Fruteau commented on issue #10659:
URL: https://github.com/apache/superset/issues/10659#issuecomment-2677371540

   > [@bkyryliuk](https://github.com/bkyryliuk) I have used the following command in my superset_config file
   > 
   > ```
   > STATS_LOGGER = StatsdStatsLogger(host='0.0.0.0', port=8125, prefix='superset')
   > ```
   > 
   > Then i am using gunicorn
   > 
   > ```
   >  nohup  gunicorn \
   >       -w 6 \
   >       -k gevent \
   >       --timeout 120 \
   >       -b  0.0.0.0:8088 \
   >       --limit-request-line 0 \
   >       --limit-request-field_size 0 \
   >       --statsd-host 0.0.0.0:8125 \
   >       "superset.app:create_app()" &
   > ```
   > 
   > AT `<IP ADDRESS>:8125 `i am not seeing any metrics i am doing anything wrong here ?
   
   Hello @Asturias-sam, and for anyone ending up there,
   
   from my understanding you missed configuring a StatsD server listening to metrics sent by gunicorn (which is running superset on port 8088 and sending statsd metrics to `<ip-addr>:8125` as per the command provided)
   
   ⚠️ superset is just using a statsd client, it does not run a statsd server
   
   For example, using the `docker-compose-non-dev.yml`, a statsd-exporter service can be added to listen for metrics : 
   
   ````yaml
     # ....
     superset:
       env_file:
         - path: docker/.env # default
           required: true
         - path: docker/.env-local # optional override
           required: false
       build:
         <<: *common-build
       container_name: superset_app
       # 📢 using statsd-host `statsd_exporter:9125`
       command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn", "--statsd-host statsd_exporter:9125", "--statsd-prefix superset"]
       user: "root"
       restart: unless-stopped
       ports:
         - 8088:8088
     # ....
   
     # 📢 new service:
     statsd-exporter:
       container_name: statsd_exporter
       image: prom/statsd-exporter
       ports:
         - 9125:9125/udp #ℹ️ listens for incoming statsd metrics
         - 9102:9102     #ℹ️ exposes prometheus metrics on :9102/metrics with superset prefix
   ````
   
   ℹ️ the target here is for a prometheus server to scrap metrics from this statsd-exporter (on port 9102)
   💡 from statsd github repo, a "bare" server can probably used with the [Dockerfile](https://github.com/statsd/statsd/blob/master/Dockerfile) they provide
    ⚠️this example cannot be run as is since the `docker-bootstrap.sh app-gunicorn` command does not natively allow additional parameters (it needs modification beyond this topic)
   


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org