From 7fcb30c27456545c8310289fc0365a0d821a73df Mon Sep 17 00:00:00 2001 From: Corentin Closs Date: Mon, 2 Dec 2019 21:54:01 +0100 Subject: [PATCH] Pushing readme + updating version number --- README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 5 ++-- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ab1ef9 --- /dev/null +++ b/README.md @@ -0,0 +1,73 @@ +#SRCDS Prometheus exporter + +Works (or should work) with the following servers : + +* Tested : + * CSGO (tested) +* Not tested : + * CSS + * L4D2 + * GMod + * TF2 + * HL2DM + +##How to install + +###Method 1 : Download sources and run + +1. Download the repo (using git clone or direct zip download) +2. Start the script with node : `node index.js`, you can create a service or run it in a screen to keep it active in background + +###Method 2 : With docker + +`docker run -d -p :9591 --name srcds_exporter srcds_exporter:latest` + +##Configure Prometheus + +Add the following configuration to Prometheus static configuration : + +``` +- job_name: 'srcds' + static_configs: + - targets: ["::"] + + + relabel_configs: + - source_labels: [__address__] + regex: "(.+):.+:.+" + replacement: "$1" + target_label: __param_ip + - source_labels: [__address__] + regex: ".+:(.+):.+" + replacement: "$1" + target_label: __param_port + - source_labels: [__address__] + regex: ".+:.+:(.+)" + replacement: "$1" + target_label: __param_password + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: : # Real exporter's IP:Port +``` + +##How to access + +If you want to see what the exporter returns, you can access : + + `http://:9591/metrics?ip=&?port=&?password=` + +##Grafana dashboard + +Is there a Grafana dashboard available ? Of course! +https://grafana.com/grafana/dashboards/11333 + + +###Support + +If you encounter any issue, feel free to open an issue. +If you want to contact me : + +* Twitter : [@Unyxos](https://twitter.com/Unyxos) +* Discord : Unyxos#5968 +* Email : [me@corentincloss.fr](mailto://me@corentincloss.fr) \ No newline at end of file diff --git a/package.json b/package.json index c684bc6..7361612 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "srcds-exporter", - "version": "0.0.1", + "version": "1.0.0", "description": "Prometheus Exporter for SRCDS game servers such as CSGO", "main": "index.js", "scripts": { @@ -21,5 +21,6 @@ "prom-client": "^11.5.3", "srcds-rcon": "^2.2.1", "working-rcon": "^0.2.8" - } + }, + "devDependencies": {} }