Coder Social home page Coder Social logo

unyxos / srcds_exporter Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 15.0 906 KB

Prometheus Exporter for SRCDS game servers, working with CSGO, CSS, GMod, HL2, L4D2 and TF2 !

Dockerfile 0.77% JavaScript 93.42% HTML 5.81%
counter-strike csgo css exporter garrys-mod garrysmod gmod grafana half-life-2 hl2 l4d2 left4dead2 metrics prometheus prometheus-exporter source-engine team-fortress-2 tf2

srcds_exporter's People

Contributors

unyxos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

srcds_exporter's Issues

Hybernate Status

Hey is it possible to add a status beside Online (1) Offline (0) like Hybernate (2) or new new status hybernate (0/1)

status
hostname: Counter-Strike: Global Offensive
version : 1.38.5.5/13855 1547/8853 secure  [G:1:6214660] 
udp/ip  : 0.0.0.0:27015  (public ip: 78.46.XXX.XXX)
os      :  Linux
type    :  community dedicated
map     : de_train
players : 0 humans, 0 bots (20/0 max) (hibernating)
# userid name uniqueid connected ping loss state rate adr
#end

Polling stats on map change

The srcds exporter seems to be polling stats sometimes on map change this causes really high server MS, etc to be reported. Ideally it should hold off for a couple of seconds and poll for new stats.

E.g. Useful for setting up alerts for high sv ms, etc.

Other games?

Hello :)

Is it possible to add other games like sons of the forest? I have a dedicated server installed via docker.

Thanks!

State up but always offline

After added correctly to Prometheus, state of the target is "up".
So port and so on should be correct.
But when I try to access the metrics in Prometheus graph with srcds_status (directly copied from metrics), it is always value 0.
But of course the server is running.
Do you have an Idea?

Error while fetching metrics from server

Hi guys,

I was trying the exporter, but encounter the same error again and again as you can see below.
cs-exp-error

I precise that i used the same config files as describe on this repository, exporter is install on the game server.

docker-compose file:

services:
  srcds_exporter:
    ports:
      - '9591:9591'
    container_name: srcds_exporter
    restart: always
    image: corentincl/srcds_exporter

On the prometheus side:

    static_configs:
      - targets: ["192.168.1.210:27015:12345:csgo"]

    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: [__address__]
        regex: ".+:.+:.+:(.+)"
        replacement: "$1"
        target_label: __param_game
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 192.168.1.210:9591

And as you can see all the metrics are returning 0 :
image

Thanks in advance guys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.