Giter VIP home page Giter VIP logo

Comments (17)

galexrt avatar galexrt commented on August 11, 2024

What game are you running the exporter against? Post the status command output of the gameserver.

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

I am running CS GO

rcon 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_dust2
players : 1 humans, 9 bots (20/0 max) (not hibernating)

# userid name uniqueid connected ping loss state rate adr
# 22 1 "bonkers" STEAM_1:1:XXXXXXX 00:29 46 0 active 128000 77.23.XXX.XXX:27005
#23 "Dustin" BOT active 128
#24 "Mike" BOT active 128
#25 "Ethan" BOT active 128
#26 "Calvin" BOT active 128
#27 "Shawn" BOT active 128
#28 "Gary" BOT active 128
#29 "Grant" BOT active 128
#30 "Irving" BOT active 128
#31 "Mark" BOT active 128
#end

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

Which version/ commit of the exporter are you running?

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

srcds.yml

---
options:
  connectTimeout: 5s
  cacheExpiration: 20s
  cacheCleanupInterval: 12s
servers:
  example_server1:
    address: 192.168.1.152:27015
    rconPassword: XXX
  example_server2:
    address: 192.168.1.153:27015
    rconPassword: XXX

Docker-Compose

version: "3.3"
services:
  csgo-exporter:
    image: quay.io/galexrt/srcds_exporter:v1.4.3
    container_name: csgo-exporter
    command: ["/bin/srcds_exporter", "--config.file","/tmp/csgo/srcds.yaml", "--collectors.enabled","map,playercount,players"]
    network_mode: host
    volumes:
      - type: bind
        source: /srv/csgoexporter/config/srcds.yaml
        target: /tmp/csgo/srcds.yaml

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

Mhh, I found the issue, seems that the status output of CSGO has changed a little bit. I'm working on updating the regexes. Will ping you when I have updated them. Thanks for reporting the issue!

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@bonkersGER Please try the latest v1.5.1 release. It should fix the reported issues.

Container images should be available in a few minutes after the build is complete: https://github.com/galexrt/srcds_exporter/actions/runs/4323470002/jobs/7547109659

https://quay.io/repository/galexrt/srcds_exporter?tab=tags&tag=latest

Edit: Don't use 1.5.0, the release didn't go through, that is fixed in 1.5.1.

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@bonkersGER v1.5.1 release has been successfully built and released. Try using the quay.io/galexrt/srcds_exporter:v1.5.1 image and see if the metrics are correct now.

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

srcds_exporter v1.5.1 Metrics

Seems still be broken

# HELP srcds_map The current map on the server.
# TYPE srcds_map gauge
srcds_map{map="Max Players",server="192.168.1.152:27015"} 1
srcds_map{map="de_dust2",server="192.168.1.153:27015"} 1
# HELP srcds_playercount_bots The current count of bot players on the server.
# TYPE srcds_playercount_bots gauge
srcds_playercount_bots{server="192.168.1.152:27015"} 69
srcds_playercount_bots{server="192.168.1.153:27015"} 0
# HELP srcds_playercount_current The current count players on the server.
# TYPE srcds_playercount_current gauge
srcds_playercount_current{server="192.168.1.152:27015"} 6
srcds_playercount_current{server="192.168.1.153:27015"} 0
# HELP srcds_playercount_humans The current count of humans players on the server.
# TYPE srcds_playercount_humans gauge
srcds_playercount_humans{server="192.168.1.152:27015"} 6
srcds_playercount_humans{server="192.168.1.153:27015"} 0
# HELP srcds_playercount_limit The limit of players on the server.
# TYPE srcds_playercount_limit gauge
srcds_playercount_limit{server="192.168.1.152:27015"} 245
srcds_playercount_limit{server="192.168.1.153:27015"} 20
# HELP srcds_scrape_collector_duration_seconds srcds_exporter: Duration of a collector scrape.
# TYPE srcds_scrape_collector_duration_seconds gauge
srcds_scrape_collector_duration_seconds{collector="map"} 1.2163e-05
srcds_scrape_collector_duration_seconds{collector="playercount"} 1.7463e-05
srcds_scrape_collector_duration_seconds{collector="players"} 4.529e-06
# HELP srcds_scrape_collector_success srcds_exporter: Whether a collector succeeded.
# TYPE srcds_scrape_collector_success gauge
srcds_scrape_collector_success{collector="map"} 1
srcds_scrape_collector_success{collector="playercount"} 1
srcds_scrape_collector_success{collector="players"} 1

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@bonkersGER Are both servers that you are scraping running CSGO? Because the CSGO server 192.168.1.153 are parsed as expected from the output you provided.

What game is running on 192.168.1.152? Can't be CSGO as well, can it?

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

Yeah both servers are runnig csgo
csgo

This is just a test enviroment we want to use it at out next LAN event to monitor 20+ Servers :)

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@bonkersGER Please provide the status command output of the 192.168.1.152 server where the metrics are wrong.

There seems to be a difference between the two servers, as the exporter returns correct metrics for the 192.168.1.153 server after the update. So either your CS:GO version is outdated on the other server or something is causing the status output to be very different between the two CS:GO servers 😄

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

192.168.1.153:27015

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

# userid name uniqueid connected ping loss state rate adr
#  2 1 "bonkers" STEAM_1:1:XXXXXXX 00:30 46 0 active 128000 77.23.XXX.XXX:27005
# 3 "Matt" BOT active 128
# 4 "Nick" BOT active 128
# 5 "Duffy" BOT active 128
# 6 "Mike" BOT active 128
# 7 "Gary" BOT active 128
# 8 "Perry" BOT active 128
# 9 "Tom" BOT active 128
#10 "Wyatt" BOT active 128
#11 "Andy" BOT active 128
#end

192.168.1.152:27015

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

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

There is no Max Players in both status command outputs. Can you try running curl -v http://192.168.1.153:27015 and curl -v http://192.168.1.152:27015 to see if the second output is from a different gameserver or app?

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

curl -v http://192.168.1.152:27015

*   Trying 192.168.1.152:27015...
* Connected to 192.168.1.152 (192.168.1.152) port 27015 (#0)
> GET / HTTP/1.1
> Host: 192.168.1.152:27015
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server


curl -v http://192.168.1.153:27015

*   Trying 192.168.1.153:27015...
* Connected to 192.168.1.153 (192.168.1.153) port 27015 (#0)
> GET / HTTP/1.1
> Host: 192.168.1.153:27015
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server

from srcds_exporter.

galexrt avatar galexrt commented on August 11, 2024

@bonkersGER Have you run the commands from where the exporter container is running?

Could you try running the curl commands inside the exporter container as well?

Also please add --log-level=DEBUG to the exporter if you can see how the input that contains Max Players comes to existence (before you post it make sure that there are no passwords or other things in the debug logs).

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

Yes i did.

Container is now runnig with the Debug Flag @galexrt

Attaching to csgo-exporter
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Starting srcds_exporter (version=, branch=, revision=e15457e518bb299fa36bd9bdf1a0ca9aabfda9fa)"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Build context (go=go1.18.10, platform=linux/amd64, user=, date=)"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Caching is disabled by default"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=debug msg="Connected to server: 192.168.1.152:27015"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=debug msg="Connected to server: 192.168.1.153:27015"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Loaded config file"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Enabled collectors:"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg=" - map"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg=" - playercount"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg=" - players"
csgo-exporter    | time="2023-03-03T13:24:35Z" level=info msg="Listening on :9137"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="players collector succeeded after 0.000017s."
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="map collector succeeded after 0.061438s."
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="playercount collector succeeded after 0.082137s."
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:24:45.800750324 +0000 UTC m=+9.889645416"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:24:45Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="players collector succeeded after 0.000005s."
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="map collector succeeded after 0.000013s."
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="playercount collector succeeded after 0.000016s."
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:25:05.717148409 +0000 UTC m=+29.806043501"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:25:05Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="players collector succeeded after 0.000004s."
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="map collector succeeded after 0.061555s."
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="playercount collector succeeded after 0.082143s."
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:25:25.799173876 +0000 UTC m=+49.888068968"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:25:25Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="playercount collector succeeded after 0.000501s."
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="players collector succeeded after 0.000016s."
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="map collector succeeded after 0.000020s."
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:25:45.717142183 +0000 UTC m=+69.806037295"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:25:45Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="players collector succeeded after 0.000003s."
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="playercount collector succeeded after 0.001257s."
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="map collector succeeded after 0.041686s."
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:25:59.696544125 +0000 UTC m=+83.785439217"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:25:59Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="playercount collector succeeded after 0.000042s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="players collector succeeded after 0.000002s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="map collector succeeded after 0.000008s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:26:03.475668132 +0000 UTC m=+87.564563224"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Finished pushing metrics from metricsCh to outgoingCh"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Finished waiting for outgoing Adapter"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Waiting for collectors"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="players collector succeeded after 0.000004s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="map collector succeeded after 0.000012s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="playercount collector succeeded after 0.000036s."
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Finished waiting for collectors"
csgo-exporter    | time="2023-03-03T13:26:03Z" level=debug msg="Updated lastCollectTime to 2023-03-03 13:26:03.869405017 +0000 UTC m=+87.958300109"

There is no Values like map or something else

from srcds_exporter.

bonkersGER avatar bonkersGER commented on August 11, 2024

@bonkersGER Have you run the commands from where the exporter container is running?

Could you try running the curl commands inside the exporter container as well?

There is no curl inside the containter

from srcds_exporter.

Related Issues (8)

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.