mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 06:05:57 +03:00
[GH-ISSUE #3003] telegraf input support #2139
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#2139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mspencerl87 on GitHub (Aug 14, 2020).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/3003
User Story
Is there anyway to export ./gameserver monitor metics to grafana?
Or is there anyway to export metrics, server stats, uptime, players, ports etc, to telegraf?
Basic info
Further Information
Would like to monitor servers status remotely, currently the only thing I can think to monitor is systemd
but this will mostly only show CPU/Memory usage
Further Reading
As an example, i run docker. I can export the docker hosts metrics via telegraf and display them in grafana like the link below.
It would be awesome to be able to do this with LinuxGSM
https://grafana.com/grafana/dashboards/10585
Another example
https://github.com/ratibor78/srvstatus
@issue-label-bot[bot] commented on GitHub (Aug 14, 2020):
Issue-Label Bot is automatically applying the label
type: feature requestto this issue, with a confidence of 0.90. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
@dgibbs64 commented on GitHub (Aug 14, 2020):
If there is an API in a similar vein to discord telegram etc then it would be possible. Of you can post any docs about sending messages via an API then I can take a look :)
@mspencerl87 commented on GitHub (Aug 14, 2020):
@dgibbs64 Are you familiar with Telegraf?
Here is the github page
https://github.com/telegraf/telegraf
https://github.com/influxdata/telegraf
https://www.influxdata.com/time-series-platform/telegraf/
@mspencerl87 commented on GitHub (Aug 14, 2020):
@dgibbs64 Generally people have been using Grafana to display metrics over the last few years.
These setups generally include the following. Grafana (Visiual) + Influxdb + Telegraf (Metrics Collector)
Telegraf can work in a push or pull configuration, alot of people use telegraf on Linux/Windows systems also SNMP, IPMI etc.
To pull metrics
You can see all the out of the box supported inputs here
https://github.com/influxdata/telegraf/tree/master/plugins/inputs
@dgibbs64 commented on GitHub (Aug 14, 2020):
I am aware of it but never the used it myself. If I can send stuff to an API endpoint/webhook via curl then It's pretty easy for me to setup. But don't know if that's possible here. Check out alert_discord.sh in my code for an example of what I mean.
@mspencerl87 commented on GitHub (Aug 14, 2020):
not finding alert_discord.sh in code. Can you share a link?
And thank you for the consideration.
@mspencerl87 commented on GitHub (Aug 14, 2020):
This might be a better example
https://github.com/anderssonoscar0/influxdb_srcds_exporter
This guy is exporting SRCDS to influxdB
This is only on CSGO, but may serve you better.
I wish i could be more help!
@DrPsychick commented on GitHub (Sep 1, 2020):
I've used telegraf quite a bit, maybe I can be of help. I would also be interested in exposing useful stats to telegraf/influxdb.
What to measure/export
First we probably need to find out what data is available. I'm running ARK with LGSM and the monitor command doesn't return anything useful except the number of players online. So if that is easy to get (without installing
gamedigas this enlarges my docker image by 300%), I'm happy to provide a small command that can expose it as telegraf metrics.The second question that comes to mind is: what common metrics are available for all servers? Ideally one could have a command that works for all servers to get version, players online etc.
@dgibbs64 I'm not so familiar with the Query or RCON port. I tried using rcon (which is fast and small), but it no longer works for my ARK server. I've seen code in LGSM (gsquery) which seems obsolete.
gamedigis too large for me as it requires installing nodejs. Is there an easier way to get status from the Query port?@dgibbs64 commented on GitHub (Sep 1, 2020):
gamedig is by far the best way to get info useful from game servers. Since game servers can be very large im not sure why increasing the size of a container and installing nodejs matters. gsquery is not obsolete and is used if gamedig is not installed, but gsquery only used to check if query is responding and not gather stats.
The main metric is player numbers and if the server is online.
@DrPsychick commented on GitHub (Sep 1, 2020):
if number of players is the only "common" metric (and if the server is online), then I'd prefer a lightweight solution.
One can easily extend my docker image or install
gamedigon the host and then create a small script to fetch the result from the log.BUT I've figured out whats wrong with RCON, so I will fix that and use it to export online players to telegraf.
@DrPsychick commented on GitHub (Sep 1, 2020):
@dgibbs64 most of what's inside the "details" result that you posted can directly fetched from the system (cpu, mem, disk, ...) so the only interesting metric (for me) so far is the number of players online. Maybe along with the server name/map/type.
@DrPsychick commented on GitHub (Sep 5, 2020):
So, with the fixed RCON script, I can now read the number of online players
python3 rcon-ark.py listplayers | grep -v 'No Players Connected' | wc -l(see https://github.com/DrPsychick/docker-linuxgsm-ark)
it would indeed be great if LGSM could provide the metric generically with a command as not all games work the same. And
gamedigseems to be able to provide the data, right? The only requirement would be that the command executes (or fails) fast and returns machine readable output.to use that with telegraf would then be easy with a script that returns influx protocol and is executed with
inputs.execin thetelegraf.conf:@dgibbs64 commented on GitHub (Oct 20, 2023):
NO update on this. If there is an api endpoint that can be used to send data like the other alerting systems then it will be worth taking a look. I have no knowledge in telegraf currently so closing for now
@github-actions[bot] commented on GitHub (Oct 21, 2024):
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.