New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/arunvelsriram/sftp-exporter

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/arunvelsriram/sftp-exporter

  • v1.4.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

sftp-exporter

Prometheus Exporter for SFTP server.

Build Status

Docker Image

arunvelsriram/sftp-exporter

docker pull 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
      --sftp-statvfs bool            SFTP use StatVFS extension features

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_PASSWORD=password ./sftp-exporter

Config File

Sample config file: 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

Contributing

Development Setup

Starts sftp-servers, prometheus, grafana and sftp-exporter:

cd playground
docker-compose up
AppURLCredentials
Grafanahttp://localhost:3000User: admin Password: password
Prometheushttp://localhost:9090NA
SFTP Basic Authlocalhost:2220User: foo Password: password
SFTP Key Authlocalhost:2221Private Key: key_with_passphrase / key_without_passphrase
SFTP Basic and Key Authlocalhost:2222Private Key: key_with_passphrase / key_without_passphrase
SFTP Exporterhttp://localhost:8081User: foo Password: password Private Key: key_with_passphrase / key_without_passphrase

FAQs

Package last updated on 30 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc