Answer the question
In order to leave comments, you need to log in
How to transfer hpmsa_exporter-master to docer and connect to Prometheus?
Exporter found MSA 1050 for storage monitoring;
https://github.com/enix/hpmsa_exporter
comes with a docker file;
FROM ubuntu:artful
MAINTAINER Antoine Millet
RUN apt update && apt install -y python3-lxml python3-prometheus-client python3-requests
COPY /compose/hpmsa_exporter-master/msa_exporter.py /bin/msa_exporter
RUN chmod +x /bin/msa_exporter
EXPOSE 8000
CMD /bin/msa_exporter "10.10.10.10" "user" "password"
hpmsa_exporter-master:
container_name: hpmsa_exporter-master
build:
context: /compose/hpmsa_exporter-master
dockerfile: Dockerfile
environment:
- HOST=10.10.10.10
- LOGIN=user
- PASSWORD=password
ports:
- "9350:8000"
- job_name: 'hpmsa_exporter-master'
scrape_interval: 10s
scrape_timeout: 10s
metrics_path: /metrics
file_sd_configs:
- files:
- '/prometheus-data/sd_configs/hpmsa_exporter-master/*.yaml'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 10.10.10.20:9350 # The conntrack exporter's real hostname:port.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question