Skip to content

node exporter with basic auth (username and password)

Notifications You must be signed in to change notification settings

omilun/node_exporter_with_basic_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Run NodeExporter with basic authentication

sudo docker run -d --name node_exporter_nginx_basic_auth -p 9100:9100 -e USERNAME=<YOUR---UserName> -e PASSWD=<YOUR---PassWord> omilun/node-exporter-basic-auth:0.17

you can get metrics by a command like below command:

curl USERNAME:PASSWORD@localhost:9100/metrics 

if you want to share container network with host you will need below command but it opens two node-exporter ports (9180[without security], 9100[with basic auth])

sudo docker run -d --name node_exporter_nginx_basic_auth --net=host -e USERNAME=<YOUR---UserName> -e PASSWD=<YOUR---PassWord> omilun/node-exporter-basic-auth:0.17

you have to block :9180 for don't let anyone to access to them.

sudo iptables -A OUTPUT -p tcp --dport 9180 -j REJECT 
sudo iptables -A OUTPUT -p tcp --sport 9180 -j REJECT

About

node exporter with basic auth (username and password)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published