From 521280a4b2789f9839cb98c4e448ecc649f88696 Mon Sep 17 00:00:00 2001 From: Bjoern Berg Date: Wed, 4 Nov 2026 12:17:14 +0100 Subject: [PATCH 1/3] added docs for credentials file format --- README.md | 2 +- cmd/root.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c882909..cc1a666 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 diff --git a/cmd/root.go b/cmd/root.go index 9f20c6d..c90dc24 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 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)") From 9ecb3e72d05eb5777b06563ad8ce8b17636a1506 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 4 Nov 2026 12:55:20 +0100 Subject: [PATCH 2/3] Apply suggestion from @martialblog --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index c90dc24..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 in json format") + 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)") From 5b084fe950adddb27d2500b43720375026fa0843 Mon Sep 17 00:00:00 2001 From: Bjoern Berg Date: Wed, 4 Nov 2026 13:00:15 +0100 Subject: [PATCH 3/3] add example json to readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index cc1a666..3ef1661 100644 --- a/README.md +++ b/README.md @@ -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: