Prometheus pushgateway

wget https://github.com/prometheus/pushgateway/releases/download/v0.10.0/pushgateway-0.10.0.linux-amd64.tar.gz

vim /etc/systemd/system/pushgateway.service
[Unit]
Description=prometheus
After=network.target
[Service]
WorkingDirectory=/usr/local/prometheus/pushgateway-0.10.0.linux-amd64
ExecStart=/usr/local/prometheus/pushgateway-0.10.0.linux-amd64/pushgateway \
                --web.enable-admin-api  \
                --persistence.file="pushfile.txt" \
                --persistence.interval=10m
[Install]
WantedBy=multi-user.target

yum install --downloadonly --downloaddir=/tmp psmisc-22.20-17.el7.x86_64
yum install  psmisc-22.20-17.el7.x86_64

vi push_threads.sh 
#!/bin/bash
# desc push system threads info
total_threads=`pstree -p |wc -l`
#echo $total_threads
job_name="system_threads"
instance="192.168.110.233"
echo "system_threads $total_threads" | curl --data-binary @- http://192.168.254.216:9091/metrics/job/$job_name/instance/$instance

# crontab -e
#*/5 * * * * /usr/local/prometheus/pushgateway-0.10.0.linux-amd64/push_threads.sh
*/5 * * * * /usr/local/prometheus/push_threads.sh