{"repo":"stfsy/prometheus-what-active-users-exporter","free":true,"listed":false,"github":"https://github.com/stfsy/prometheus-what-active-users-exporter","clone":"git clone https://github.com/stfsy/prometheus-what-active-users-exporter.git","description":"Prometheus exporter that scrapes currently logged in users on unix systems","language":"JavaScript","stars":32,"topics":["prometheus","prometheus-exporter","w","ssh"],"license":"MIT","category":"analytics","readme_excerpt":"Active Users Exporter for Prometheus This is a simple server that scrapes the output of the unix command w . w displays information about the users currently on the machine, and their processes. Why would you want to do that? This exporter will allow you to monitor who logs into your system. So you can define alarms for unauthorized users, the max. amount of active session or even every active user session. W will also monitor logins via SSH which allows you to track even active remote sessions. Currently, three metrics are created and exposed: - Status of the exporter: what up{version=\"x.x.x\"} 1 - Sum of session per user: what user sessions currently active{user=\"demo\"} 1 - Single sessions per user: what each session currently active{user=\"pip3\",ip=\"192.168.2.107\",tty=\"pts/0\"} 1 The exporter was tested on Ubuntu. Getting Started Download the binary from the latest release. We currently provide binaries for Linux and Alpine Linux on amd64. To download latest Linux version and check sha256 sum: To run it: Help on flags: Usage By default the exporter will start with sensible default values. Configuration can be customized with the following command line flags: - --listen.host: default=127.0.0.1 - --listen.port default=127.0.0.1 - --metrics.endpoint default=/metrics - --metrics.prefix default=what - --metrics.with-timestamp default=false - --scrape.interval default=5000 :warning: There's a tradeoff between detecting every single and possibly very short login vs. putting addition","default_branch":null,"files":null,"tree":[],"storefront":"/r/stfsy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stfsy/prometheus-what-active-users-exporter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}