Create an account


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xonotic server monitoring

#1
Hi, If you are hosting your own xonotic server you probably had an idea to make server monitoring with graphs and maybe even alerts (so you will receive notification if something goes wrong). I'd like to to show you one way to do it. I'm using it for monitoring my own servers, also most graphs are public, so you can check them here and here. I'll post screenshot for convenience.

Heart of my monitoring system is prometheus, which collects and stores metrics data, also it allows easy querying and processing of this data. It interesting system, because while most monitoring system are push based, prometheus is pull-based. It means that prometheus requests  metrics from other parties and not vice versa (other party not pushes metrics). As already you have seen, I'm using graphana as UI for prometheus data. Each graph you have seen in links I have posted below are result of prometheus queries. Any data store and UI aren't useful without actual data to process and graph. Promtheus can work with applications that specially developed to be compatible with it or with gateways (called exports in prometheus) that export metrics in prometheus format, so it can collect and save those metrics. I'm using 3 exporters:
  • node_exporter — for collecting metrics about node/machine itself, it should be installed on each server you want to be monitored
  • xonotic_exporter — which is my own stuff, it exports some game metrics via rcon, also measures rtt from machine it hosted to game server
  • blackbox_exporter — it allows to measure rtt using different protocols, so you can compare in game rtt vs icmp ping rtt, etc.

For alerting I'm using alertmanager, it is part of prometheus project.

To make you setup easier, I'll post here example prometheus config:

Code:
global:
 scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

 - job_name: 'node_exporter'
   static_configs:
     - targets: ['pub.regulars.win:9100']

 - job_name: 'xonotic_exporter'
   relabel_configs:
     - source_labels: [__address__]
       target_label: __param_target
     - source_labels: [__param_target]
       target_label: instance
     - target_label: __address__
       replacement: 127.0.0.1:9260
   static_configs:
     - targets: ['pub.regulars.win', 'mars.regulars.win', 'votable.regulars.win']

It's actually simplified version of my own config. Also, note that prometheus is using yaml for confgiuration file.

If you have any question about this setup you can ask me here or IRC, I will be happy to help.

Also, I want announce about second release of xrcon library. New release have few fixes also new tool: xping. Which can ping xonotic server or client, also it supports other games too (it supports Quake 3, Quake 2 and qfusion protocols).

Hope this will be helpful for you.


Attached Files Thumbnail(s)
   
Reply

#2
That is really, really nice Slava. Thanks for sharing! Have an upvote.
asyyy^ | are you releated to chuck norris?
Reply

#3
Wow that looks good Slava, u the KING!!!

I will need some help to set this up:-)

cheers

kwak
[Image: 39855.png]
Reply

#4
Looks great! I tried installing it but when I run:

Code:
pip install -e git+https://github.com/bacher09/xrcon#egg=xrcon

i get these errors:


Code:
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

I would also like to set up graphs - can you help me with these issues? Thanks!
--- https://BattleGrrls.GamePlayer.club - All-female Xonotic clan
--- https://sourceforge.net/projects/xonotic-utilities/ - My suite of utilities for Linux server operators
Reply

#5
(09-17-2018, 01:17 AM)MarisaG Wrote: i get these errors:


Code:
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

I would also like to set up graphs - can you help me with these issues? Thanks!

Perhaps this? https://stackoverflow.com/questions/4983...-name-main
Reply

#6
Looks like that might be it... Thx.
--- https://BattleGrrls.GamePlayer.club - All-female Xonotic clan
--- https://sourceforge.net/projects/xonotic-utilities/ - My suite of utilities for Linux server operators
Reply

#7
This is a bit old (but for some reason I got email notification about this thread). Anyway, wanted to say that current exporter is a bit outdated and I made a new one. It has some api functionality, as well as prometheus exporter. That's what I'm using for regulars.win website.
Reply

#8
(09-16-2022, 04:46 AM)Sl@va Wrote: This is a bit old (but for some reason I got email notification about this thread). Anyway, wanted to say that current exporter is a bit outdated and I made a new one. It has some api functionality, as well as prometheus exporter. That's what I'm using for regulars.win website.

Thank you. Looking into it.
FAF - FERIS - COPENHAGEN - DENMARK - GNU/Linux  Heart
Homepage: https://feris-xonotic.net
Reply

#9
(09-16-2022, 04:46 AM)Sl@va Wrote: This is a bit old (but for some reason I got email notification about this thread). Anyway, wanted to say that current exporter is a bit outdated and I made a new one. It has some api functionality, as well as prometheus exporter. That's what I'm using for regulars.win website.

Thinking of using a Docker Prometheus container and a Xonotic exporter.

Do you have any documentation?
FAF - FERIS - COPENHAGEN - DENMARK - GNU/Linux  Heart
Homepage: https://feris-xonotic.net
Reply

#10
You can check some graphs (that's public)  here .
Regarding documentation, no I don't have any documentation for it, but everything is dead simple. Old exporter has configuration sample and new one has JSON schema for the configuration file which follows same format.
You also can experiment with my instance that is running, for example players API:
Code:
https://api.regulars.win/servers
. Prometheus url in my instance is blocked from the internet (it's available for the prometheus).

Also it's open-source, so you can modify it as you want too to fit your need.
Reply

#11
(04-16-2023, 10:56 AM)Sl@va Wrote: You can check some graphs (that's public)  here .
Regarding documentation, no I don't have any documentation for it, but everything is dead simple. Old exporter has configuration sample and new one has JSON schema for the configuration file which follows same format.
You also can experiment with my instance that is running, for example players API:
Code:
https://api.regulars.win/servers
. Prometheus url in my instance is blocked from the internet (it's available for the prometheus).

Also it's open-source, so  you can modify it as you want too to fit your need.

OK, thank you, I will check it out.
FAF - FERIS - COPENHAGEN - DENMARK - GNU/Linux  Heart
Homepage: https://feris-xonotic.net
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  I can't see my listen server on server list fnmain 1 1,168 10-07-2023, 07:28 AM
Last Post: Grimnack
  Server not visible on the server browser for others or me DankoLord 1 2,148 02-21-2023, 08:02 PM
Last Post: ballerburg9005
  BaI server | South American Xonotic server (located in Chile) z411 0 3,171 01-02-2022, 11:36 PM
Last Post: z411
  Full server tutorial start-2-finish with maps & config from live server xonotic.us.to ballerburg9005 0 10,063 09-03-2021, 10:21 AM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 5,503 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [NEED HELP] Server dont appear in server browser abslimit 0 2,815 03-15-2020, 04:13 AM
Last Post: abslimit
  How to change server cfg on modified server veecho 4 4,919 04-24-2019, 08:15 PM
Last Post: BuddyFriendGuy
  [NEED HELP] Xonotic Server crashes TF2 server Professor 2 3,285 02-20-2018, 07:50 PM
Last Post: Professor
  0.6.0 Server not shown in server browser -maniac|Su- 2 4,038 06-04-2015, 10:48 AM
Last Post: -maniac|Su-
  Server appears to launch but is not in the server list TickleMeElmo 5 5,492 06-09-2012, 02:24 PM
Last Post: Mr. Bougo

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-