Unyxos / srcds_exporter

Prometheus Exporter for SRCDS game servers, working with CSGO, CSS, GMod, HL2, L4D2 and TF2 !
36 stars 15 forks source link

Hybernate Status #15

Open bonkersGER opened 1 year ago

bonkersGER commented 1 year ago

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
Unyxos commented 1 year ago

Hey I'll check that when I have some more free time :)

Nexxed commented 1 year ago

Hey @bonkersGER, I've added this to my fork of the project here (if it's useful at all).

I intend to move everything over to TypeScript and ESM in the near future. I'll make a PR when I feel that it's in a comfortable state if you're cool with that @Unyxos :)

Unyxos commented 1 year ago

Hey there @Nexxed !

Thanks a lot! Feel free to create a PR whenever you want ! That's much appreciated and I saw it includes things I wanted to add on my side but didn't had time to do it

Nexxed commented 1 year ago

Hey there @Nexxed !

Thanks a lot! Feel free to create a PR whenever you want ! That's much appreciated and I saw it includes things I wanted to add on my side but didn't had time to do it

Hey :)

TypeScript has been implemented on the typescript branch of my fork. Currently testing a fix for #10 as well. I'll make sure everything works as intended before making a PR as I don't want to break existing srcds_exporter instances.

Another thing; as I'm only able to test CS:GO at the moment, most of the new things added to it are only available for that game, as I don't want to break the others due to lack of testing.

Unyxos commented 1 year ago

Hey!

When the PR will be submitted I should be able to try for all other games during a weekend if you want :)

as of #10 I was still debating with myself whether to have some checks like this, in theory the exporter should be really just reporting what it sees without doing any "interpretation". Alerting rules/monitoring should be where one configures in a way that they allow for a "small" delay before alerting, otherwise you can sometime end up with the exporter reporting stuff that's not representing the reality