You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
547 B
19 lines
547 B
#!/bin/sh
|
|
#http://<IP-адрес сервера pushgateway>:9091/metrics/job/<Тег для job>/instance/<Тег для instance>
|
|
#*/1 * * * * /bin/sh /services/NodeExporterRelay/pushgateway/check.sh
|
|
BASIC_U=
|
|
BASIC_P=
|
|
JOB=
|
|
INSTANCE=
|
|
|
|
SOURCE=http://localhost:9101/metrics
|
|
DEST=http://localhost:9100/metrics/job/$JOB/instance/$INSTANCE
|
|
IWANNASLEEP=15
|
|
|
|
alias pushmetrics="curl -s \"${SOURCE}\" | curl -u \"${BASIC_U}:${BASIC_P}\" --data-binary @- \"${DEST}\" >> /dev/null"
|
|
|
|
pushmetrics
|
|
sleep $IWANNASLEEP
|
|
pushmetrics
|
|
sleep $IWANNASLEEP
|
|
pushmetrics
|
|
|