20:07 < Darcidride> Hi, im a little server admin noob in Teeworlds and i want to know if we can monitoring the number of ingame players ? a file with 1 pseudo per line refresh every minutes for example, this will grant me the possibility to monitor it with my nagios/zabbix server (I want to publish publicly the graphs) 20:09 < Obani> heinrich5991 ? 20:12 <@heinrich5991> Obani? 20:12 < Obani> ^ 20:12 < Obani> :p 20:13 <@heinrich5991> I'm not aware of any tool that does this by default 20:14 < Darcidride> well a self made script by the community or anything else which can help me in my task should be ok :) 20:14 < Darcidride> it's a littel curious that, nobody as never think about it :p 20:18 < Obani> Darcidride, https://www.teeworlds.com/forum/search.php 20:18 < Obani> At least we can do that for now 20:19 < Henningstone> what about this? https://www.teeworlds.com/forum/viewtopic.php?id=11626 20:19 < Henningstone> it even creates the graphs on its own 20:20 < Obani> lol 20:20 < Obani> was about to send this 20:21 < Darcidride> oww ! 20:22 < Darcidride> great tool ! but i prefer to centralize my monitoring inside my actual monitoring tool, but in this tool i think i can find some useful things, thank you i will investigate it 20:22 <@heinrich5991> echo -n $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgie3\xff' | nc -u -w 1 127.0.0.1 8303 | head -z -n 7 | tail -z -n 1 | tr '\0' '\n' 20:22 <@heinrich5991> this is what I quickly hacked together, it doesn't terminate correctly though 20:23 <@minus> Darcidride: are you already using nagios or zabbix? 20:23 < Obani> zabbix 20:23 < Darcidride> i already use zabbix yes 20:24 < Darcidride> zabbix is a fork of nagios 20:24 <@minus> no it's not 20:24 < Darcidride> i test your solution heinrich5991 20:25 <@heinrich5991> as said, it doesn't terminate correctly 20:25 <@minus> should be possible to record metrics with zabbix easily. nagios can't record metrics (it's also very difficult to configure) 20:26 < Darcidride> i've also a sleeping shinken and a nagios instance, but i prefer Zabbix for my actual infrastrucutre 20:28 <@minus> sleeping shinken? 20:28 < Darcidride> stopped VM :) 20:28 <@minus> used to use zabbix, made the mistake of switching to icinga 20:28 < Darcidride> well, the point is i want to monitor the number of online players on my TW servers 20:28 <@minus> thought zabbix was bad, but icinga is just horrible 20:29 < Darcidride> ahah icinga, i turn around EON currently, i think i will try it soon :) 20:30 <@minus> turn around EON? 20:31 <@minus> i'm assuming you deal with sysadminning professionally? 20:32 < Darcidride> Eyes of Network, I think this monitoring tool have a great future 20:32 * minus takes a look 20:33 <@minus> oh, it builds ontop of or at least interfaces with nagios and cacti. seems decent 20:33 <@minus> much reporting 20:34 < Darcidride> im a "little" sysadmin, it's my hobby and i hope my future job, for now im just a student (Job alternately, didn't know if it's the good word in english, 50% of the time in a company, 50% of the time in a professionnal training school :)) 20:35 < Darcidride> yes, the interfaces is great, i like the KISS inspirations 20:38 <@minus> i'll probably end up writing something for gathering monitoring data myself. haven't found a solution i find decently easy and comfortable to use :( 20:38 <@minus> goes into the category "that can't be so hard" 20:39 < Darcidride> dev alone a monitoring system ? based on nothing ? you're crazy =) 20:39 <@minus> just for personal use, and probably just the backend 20:39 <@minus> if i ever get to it™ 20:40 < Darcidride> maybe a ELK stack can give you the "only" informations you need ? 20:41 <@minus> https://github.com/kahun/awesome-sysadmin#monitoring fyi 20:42 < Darcidride> what an interesting list of sysadmin tools ! 20:42 < Darcidride> well, i still looking for a solution for my TW servers :D 20:45 < Darcidride> the player name connected to our server isn't stored somewhere ? 20:47 <@minus> nah, but you can query it 20:48 <@minus> you want more than just the player count? 20:48 < Darcidride> only the player count 20:48 <@minus> heinrich5991: what $ in your command is evaling \x? could also use echo -e in that case 20:48 <@minus> did heinrich5991's command not work? 20:49 <@heinrich5991> minus: yes, it is 20:49 <@minus> it's the simplest solution, but not perfect 20:49 < Darcidride> yes, it doesn't work 20:49 < Darcidride> i try to adapt it, but without success for the moment 20:49 <@heinrich5991> the program doesn't terminate though, no idea how to do that in netcat 20:49 <@minus> you'll need a program to query that stuff then. 20:49 <@minus> oh 20:49 <@minus> manpage should have info on that 20:50 <@minus> -q 1 might work 20:50 <@minus> (assuming openbsd netcat) 20:50 < Darcidride> debian netcat, hope it's the same =) 20:51 <@minus> well, debian either has gnu netcat or openbsd netcat (or even both) installed 20:51 <@minus> -w 1 maybe 20:51 < Darcidride> can you give the entire command line to me please ? 20:52 < Darcidride> netcat isn't my cup of tea 20:52 <@minus> oh, heinrich5991 already had -w 1 in there 20:53 <@minus> well, you can easily write a little C/Python/PHP/Ruby/Perl program to do the work 20:54 < Darcidride> why not a bash script ? 20:54 < Darcidride> it's just one line =) 20:54 < Darcidride> (if it works) 20:54 <@minus> because it has to deal with binary data, a udp socket and it has to exit after the first response 20:55 <@minus> probably doable in bash, but bash sucks 20:56 < Darcidride> unfortunaly, i don't think it's the skills to do it in python, i will check it later 20:56 < Darcidride> i've the skills* 20:57 <@minus> echo -n $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgie3\xff' | nc -u -w 1 -q 1 127.0.0.1 8303 | head -z -n 7 | tail -z -n 1 | tr '\0' '\n' ← this actually works (added -q 1 so it quits if the server is not responding, but doesn't print anything) 20:58 < rand> neat. 21:00 < Darcidride> i look the bsd man of tail, and my linux tail and i didn't see the -z option, what's that ? 21:00 < Darcidride> (tail and head) 21:09 < rand> -z, --zero-terminated line delimiter is NUL, not newline 21:15 <@minus> Darcidride: https://sr.ht/kj7s.py 21:17 < Darcidride> wow minus, awesome ! :p 21:19 <@minus> works with py2 too btw 21:25 <@heinrich5991> minus: only with from __future__ import print_function, right? 21:27 <@minus> nope 21:27 <@minus> () is interpreted as normal brackets 21:27 <@minus> if you have a comma in there it will print as a tuple tho 21:28 < Darcidride> minus, i should be good if you post this on the forum 21:28 <@minus> hm? 21:30 < Darcidride> if you post your little python script on the TW forum, nothing will be lost, and people will be grateful 21:31 <@minus> eh, doesn't matter, it's easily written again 21:31 < Darcidride> it's not easy re-written for everyone, it's just what i mean :) 21:33 < Darcidride> easily re-writtable* 21:33 <@minus> well, there's a more complete project here: https://git.mnus.de/minus/teeworlds_srvbrowse 21:34 <@minus> feel free to post it somewhere though, i'm putting it in the public domain (if that even applies to such a short script) 21:35 <@heinrich5991> minus: print("usage: {} HOST PORT".format(sys.argv[0], file=sys.stderr)) 21:35 <@heinrich5991> it only works in python 2 because you made an error :) 21:38 <@minus> oh. 21:38 <@heinrich5991> the parantheses aren't correct 21:38 <@minus> yeah 21:38 <@minus> https://sr.ht/Io8C.py there 21:38 <@minus> fixed 21:38 <@minus> i hope you're happy now 21:42 < nameless_tee40> hey everybody! 21:42 < nameless_tee40> wassup! 21:43 <@minus> greetings 21:43 < nameless_tee40> wow, my name is nameless( sad 21:44 < nameless_tee40> should change 21:45 < nameless_tee40> hm...... how I can do thi..... 21:45 <@minus> /nick nameless_tee41 21:45 <@heinrich5991> can you be this new to IRC when you are logged into Q? :) 21:57 < stanrud> hey 21:57 < stanrud> yeahhh 21:58 < stanrud> changed it)