diff --git a/README.md b/README.md index c882909..3ef1661 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Flags: --ca-cert string CA certificate (file path) --client-cert string Client certificate (file path) --client-key string Client certificate key (file path) - -f, --credentials-file string Path to the credentials file + -f, --credentials-file string Path to the credentials JSON file (file path) -d, --database string Database name (default "vspheredb") -h, --help help for check_vspheredb_data -H, --host string Database host to connect to @@ -61,6 +61,15 @@ Flags: --sensor string Sensor name filter (supports SQL LIKE pattern) ``` +## Credentials File +To use the credentials-file feature, you need to have an appropiate file in the JSON Format: +``` +{ + "username": "vspheredb", + "password": "vspheredb" +} +``` + ## Development To build the tool yourself using the Golang toolchain: diff --git a/cmd/root.go b/cmd/root.go index 9f20c6d..778ac1f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -61,7 +61,7 @@ func init() { rootCmd.PersistentFlags().StringVarP(&database, "database", "d", "vspheredb", "Database name") rootCmd.PersistentFlags().StringVarP(&username, "username", "u", "vspheredb", "Database username") rootCmd.PersistentFlags().StringVarP(&password, "password", "P", "vspheredb", "Database password") - rootCmd.PersistentFlags().StringVarP(&credentialsFile, "credentials-file", "f", "", "Path to the credentials file") + rootCmd.PersistentFlags().StringVarP(&credentialsFile, "credentials-file", "f", "", "Path to the credentials file in the JSON format") rootCmd.PersistentFlags().BoolVar(&useTLS, "tls", false, "Use TLS to connect to the database") rootCmd.PersistentFlags().StringVar(&caCertPath, "ca-cert", "", "CA certificate (file path)") rootCmd.PersistentFlags().StringVar(&clientCertPath, "client-cert", "", "Client certificate (file path)")