diff options
| author | Oleg Pykhalov <go.wigust@gmail.com> | 2018-12-19 20:47:15 +0300 |
|---|---|---|
| committer | Oleg Pykhalov <go.wigust@gmail.com> | 2018-12-19 21:15:12 +0300 |
| commit | 0485717ee94e7f161d072f017edce5d35df49c81 (patch) | |
| tree | 04d28f8c98bf4656f1aab640d1337858646f9dc7 /gnu | |
| parent | 9a50cedc6bd0332339fda9a20327d5ac5383bc15 (diff) | |
services: zabbix-front-end: Improve hint and error messages.
* gnu/services/monitoring.scm (zabbix-front-end-config): Improve hint and
error messages.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/monitoring.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm index 18413096e41..4c7a717a9de 100644 --- a/gnu/services/monitoring.scm +++ b/gnu/services/monitoring.scm | |||
| @@ -29,9 +29,11 @@ | |||
| 29 | #:use-module (guix gexp) | 29 | #:use-module (guix gexp) |
| 30 | #:use-module (guix packages) | 30 | #:use-module (guix packages) |
| 31 | #:use-module (guix records) | 31 | #:use-module (guix records) |
| 32 | #:use-module ((guix ui) #:select (display-hint)) | ||
| 32 | #:use-module (ice-9 match) | 33 | #:use-module (ice-9 match) |
| 33 | #:use-module (ice-9 rdelim) | 34 | #:use-module (ice-9 rdelim) |
| 34 | #:use-module (srfi srfi-26) | 35 | #:use-module (srfi srfi-26) |
| 36 | #:use-module (srfi srfi-35) | ||
| 35 | #:export (darkstat-configuration | 37 | #:export (darkstat-configuration |
| 36 | prometheus-node-exporter-configuration | 38 | prometheus-node-exporter-configuration |
| 37 | darkstat-service-type | 39 | darkstat-service-type |
| @@ -525,16 +527,16 @@ $DB['DATABASE'] = '" db-name "'; | |||
| 525 | $DB['USER'] = '" db-user "'; | 527 | $DB['USER'] = '" db-user "'; |
| 526 | $DB['PASSWORD'] = '" (if (string-null? db-password) | 528 | $DB['PASSWORD'] = '" (if (string-null? db-password) |
| 527 | (if (string-null? db-secret-file) | 529 | (if (string-null? db-secret-file) |
| 528 | (display "Provide a `db-secret-file' \ | 530 | (raise (condition |
| 529 | or `db-password' field. | 531 | (&message |
| 530 | " | 532 | (message "\ |
| 531 | (current-error-port)) | 533 | You must provide either 'db-secret-file' or 'db-password'.")))) |
| 532 | (string-trim-both | 534 | (string-trim-both |
| 533 | (with-input-from-file db-secret-file | 535 | (with-input-from-file db-secret-file |
| 534 | read-string))) | 536 | read-string))) |
| 535 | (begin | 537 | (begin |
| 536 | (display " | 538 | (display-hint " |
| 537 | Hint: Consider use `db-secret-file' instead of `db-password' and unset | 539 | Consider use `db-secret-file' instead of `db-password' and unset |
| 538 | `db-password' for security in `zabbix-front-end-configuration'. | 540 | `db-password' for security in `zabbix-front-end-configuration'. |
| 539 | ") | 541 | ") |
| 540 | db-password)) "'; | 542 | db-password)) "'; |
