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://FPS.GamePlayer.club - Fan-site for FPS games, most specificly Xonotic
--- https://BattleGrrls.GamePlayer.club - A clan for female Xonotic gamers
--- https://sourceforge.net/projects/xonotic-utilities/ - My suite of utilities for Linux server operators
--- https://discord.gg/fYmDhN - Discord server for my Xonotic clan
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://FPS.GamePlayer.club - Fan-site for FPS games, most specificly Xonotic
--- https://BattleGrrls.GamePlayer.club - A clan for female Xonotic gamers
--- https://sourceforge.net/projects/xonotic-utilities/ - My suite of utilities for Linux server operators
--- https://discord.gg/fYmDhN - Discord server for my Xonotic clan
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Xonotic server running behind UDP proxy not working doombringeroperator 2 180 01-07-2019, 02:23 PM
Last Post: doombringeroperator
  [NEED HELP] Server show on the browser list, but I can't connect! Professor 1 128 12-19-2018, 11:39 AM
Last Post: Professor
  Server Setup for Dummies litvinenkotea 7 3,463 12-08-2018, 01:20 PM
Last Post: tehjester78
  Local LAN Xonotic game server player Stats animatedjay 3 509 11-23-2018, 12:38 AM
Last Post: BuddyFriendGuy
  Deploying a server across multiple machines ar5n1c 1 225 11-21-2018, 11:08 AM
Last Post: martin-t
  Fix Duel on Server Australis Antares* 0 242 09-30-2018, 11:45 PM
Last Post: Antares*
  Running a config script when the server becomes empty? Notavi 3 413 08-18-2018, 12:10 AM
Last Post: BuddyFriendGuy
  Recommended specs for a new server northivanastan 2 635 06-28-2018, 03:38 PM
Last Post: northivanastan
  how to setup a xonotic linux server on CentOS 7.5 DrunkenMaster 1 746 05-29-2018, 06:11 PM
Last Post: Lyberta
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 5 942 02-22-2018, 05:43 PM
Last Post: e-pig

Forum Jump:


Users browsing this thread:
1 Guest(s)

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