sftp-exporter

所属分类:大数据
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2021-10-27 18:40:39
上 传 者sh-1993
说明:  SFTP服务器的Prometheus导出器
(Prometheus Exporter for SFTP server)

文件列表:
.dockerignore (10, 2021-10-27)
.goreleaser.yml (400, 2021-10-27)
.talismanrc (119, 2021-10-27)
.travis.yml (953, 2021-10-27)
Dockerfile (272, 2021-10-27)
Makefile (1269, 2021-10-27)
cmd/ (0, 2021-10-27)
cmd/root.go (2611, 2021-10-27)
cmd/version.go (339, 2021-10-27)
go.mod (671, 2021-10-27)
go.sum (18074, 2021-10-27)
grafana/ (0, 2021-10-27)
grafana/SFTP-1621083257598.json (16688, 2021-10-27)
grafana/screenshot-1.png (190111, 2021-10-27)
grafana/screenshot-2.png (181682, 2021-10-27)
main.go (312, 2021-10-27)
pkg/ (0, 2021-10-27)
pkg/client/ (0, 2021-10-27)
pkg/client/sftp_client.go (1016, 2021-10-27)
pkg/client/ssh.go (2550, 2021-10-27)
pkg/client/ssh_test.go (3560, 2021-10-27)
pkg/collector/ (0, 2021-10-27)
pkg/collector/sftp_collector.go (3339, 2021-10-27)
pkg/collector/sftp_collector_test.go (11383, 2021-10-27)
pkg/constants/ (0, 2021-10-27)
pkg/constants/constants.go (44, 2021-10-27)
pkg/constants/viperkeys/ (0, 2021-10-27)
pkg/constants/viperkeys/viper_keys.go (406, 2021-10-27)
pkg/internal/ (0, 2021-10-27)
pkg/internal/mocks/ (0, 2021-10-27)
pkg/internal/mocks/sftp_client.go (2727, 2021-10-27)
pkg/internal/mocks/ssh_keys.go (7188, 2021-10-27)
pkg/server/ (0, 2021-10-27)
pkg/server/logging_middleware.go (1118, 2021-10-27)
pkg/server/server.go (1067, 2021-10-27)
playground/ (0, 2021-10-27)
playground/docker-compose.yml (6192, 2021-10-27)
playground/prometheus/ (0, 2021-10-27)
... ...

# sftp-exporter [Prometheus Exporter](https://prometheus.io/docs/instrumenting/exporters/) for [SFTP](https://www.ssh.com/ssh/sftp/) server. [![Build Status](https://app.travis-ci.com/arunvelsriram/sftp-exporter.svg?branch=master)](https://app.travis-ci.com/arunvelsriram/sftp-exporter) ## Configurations Configurations can be provided in various ways. ### Command-line Flags ``` Prometheus Exporter for SFTP. Usage: sftp-exporter [flags] sftp-exporter [command] Available Commands: help Help about any command version Prints the current version Flags: --bind-address string exporter bind address (default "127.0.0.1") -c, --config-file string exporter config file (default "sftp-exporter.yaml") -h, --help help for sftp-exporter --log-level string log level [panic | fatal | error | warning | info | debug | trace] (default "info") --port int exporter port (default 8080) --sftp-host string SFTP host (default "localhost") --sftp-key string SFTP key (base64 encoded) --sftp-key-passphrase string SFTP key passphrase --sftp-password string SFTP password --sftp-paths strings SFTP paths (default [/]) --sftp-port int SFTP port (default 22) --sftp-user string SFTP user Use "sftp-exporter [command] --help" for more information about a command. ``` ### Environment Variables Configs can be passed using environment variables. For example: ``` $ SFTP_HOST=example.com SFTP_PORT=22 SFTP_USER=example SFTP_PASS=password ./sftp-exporter ``` ### Config File Sample config file: [`sftp-exporter.yaml`](sftp-exporter.yaml) By default `sftp-exporter` looks for a config file named `sftp-exporter.yaml` in the PWD. Custom config file can be provided using `--config-file` flag. >Order of precedence: Flags > Environment variables > Config file ## Metrics ``` # HELP sftp_filesystem_free_space_bytes Free space in the filesystem containing the path # TYPE sftp_filesystem_free_space_bytes gauge sftp_filesystem_free_space_bytes{path="/upload1"} 7.370901504e+10 sftp_filesystem_free_space_bytes{path="/upload2"} 7.370901504e+10 # HELP sftp_filesystem_total_space_bytes Total space in the filesystem containing the path # TYPE sftp_filesystem_total_space_bytes gauge sftp_filesystem_total_space_bytes{path="/upload1"} 8.4281810944e+10 sftp_filesystem_total_space_bytes{path="/upload2"} 8.4281810944e+10 # HELP sftp_objects_available Number of objects in the path # TYPE sftp_objects_available gauge sftp_objects_available{path="/upload1"} 1 sftp_objects_available{path="/upload2"} 3 # HELP sftp_objects_total_size_bytes Total size of all the objects in the path # TYPE sftp_objects_total_size_bytes gauge sftp_objects_total_size_bytes{path="/upload1"} 312 sftp_objects_total_size_bytes{path="/upload2"} 2337 # HELP sftp_up Tells if exporter is able to connect to SFTP # TYPE sftp_up gauge sftp_up 1 ``` ## Grafana Dashboard [Grafana Dashoard](https://grafana.com/grafana/dashboards/12828)

近期下载者

相关文件


收藏者