From 251c3004e0eea1324335dfb982cc9ddfe675ff61 Mon Sep 17 00:00:00 2001 From: rzrbld Date: Tue, 28 Apr 2020 18:55:02 +0300 Subject: [PATCH] rm unused code --- README.md | 2 +- handlers/response.go | 10 ---------- main.go | 6 +++++- 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 handlers/response.go diff --git a/README.md b/README.md index fa464b9..36b2d80 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ docker run -d \ ``` :boom: let's suppose everything running ok, and you don't have any error messages from ze3000

by default ze3000 brings up next endpoints: -- `/metrics` - main and exported metrics (you can change it over ZE3000_METRIC_URI_PATH environment variable. In exampe above this env variable set to `/my-metrics`) +- `/metrics` - main and exported metrics (you can change it over ZE3000_METRIC_URI_PATH environment variable. In example above this env variable set to `/my-metrics`) - `/ready` - readiness probe for k8s monitoring - `/live` - liveness probe for k8s monitoring diff --git a/handlers/response.go b/handlers/response.go deleted file mode 100644 index bac8f1e..0000000 --- a/handlers/response.go +++ /dev/null @@ -1,10 +0,0 @@ -package handlers - -import ( - iris "github.com/kataras/iris/v12" -) - -var Probes = func(ctx iris.Context) { - var res = iris.Map{"Success": "OK"} - ctx.JSON(res) -} diff --git a/main.go b/main.go index bac314a..740eca8 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ func main() { fmt.Println("\033[31m\r\n\r\n\r\n███████╗███████╗██████╗ ██████╗ ██████╗ ██████╗ \r\n╚══███╔╝██╔════╝╚════██╗██╔═████╗██╔═████╗██╔═████╗ \r\n ███╔╝ █████╗ █████╔╝██║██╔██║██║██╔██║██║██╔██║ \r\n ███╔╝ ██╔══╝ ╚═══██╗████╔╝██║████╔╝██║████╔╝██║ \r\n███████╗███████╗██████╔╝╚██████╔╝╚██████╔╝╚██████╔╝ \r\n╚══════╝╚══════╝╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ \r\n\033[m") fmt.Println("\033[33mZabbix Exporter for Prometheus") - fmt.Println("version : 0.1 Alpha") + fmt.Println("version : 0.5") fmt.Println("Author : rzrbld") fmt.Println("License : MIT") fmt.Println("Git-repo : https://github.com/rzrbld/zabbix-exporter-3000 \033[m \r\n") @@ -44,5 +44,9 @@ func main() { ctx.WriteString("ok") }) + app.Get("/", func(ctx iris.Context) { + ctx.WriteString("zabbix-exporter-3000") + }) + app.Run(iris.Addr(cnf.MainHostPort), iris.WithoutServerError(iris.ErrServerClosed)) }