Game Server Reporting - UT2004, QW, BF1042, BFV, COD, HL
Moderators: Developers, Moderators
Hi,
I have this working and would like the graphs to report correct info.
At the moment the game server has 6 player in and the data at the bottom is reporting.
Max Players: 14.00
Current: 6.00
Average: 4.99
Maximum: 6.00
How can I get it to show
Max Players: 14
Current: 6
Average: 4
Maximum: 6
Lose the .00 ????
Please help
I have this working and would like the graphs to report correct info.
At the moment the game server has 6 player in and the data at the bottom is reporting.
Max Players: 14.00
Current: 6.00
Average: 4.99
Maximum: 6.00
How can I get it to show
Max Players: 14
Current: 6
Average: 4
Maximum: 6
Lose the .00 ????
Please help
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Help other people out in the future and post what you did...
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Re: My changed implementation to monitor lots of gameservers
Perhaps I'm being dense. How do I specify IP/port information?hangy wrote:Hi all,
I took this nice idea and created a new implementation which supports more games.
For information, installation instructions, license and a list of supported games, please see the README.txt included in the archive.
Hrrmm, I may have bigger issues. When importing the templates (per the Readme.txt) I am getting some Unmet Dependencies
importing "cacti_graph_template_game_server_status_players.xml"
Code: Select all
Cacti has imported the following items:
GPRINT Preset
[success] Normal [update]
Graph Template
[success] Game Server Status - Players [new]
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
I've gotten Hangy's templates to work now. The steps I took were as follows:
Download and install his scripts per his README.txt (I ignored the unmet dependancy issues from my prior post)
In cacti (with administrative priviledges)
1) Console -> "Data Input Methods" -> Game Server Status
a. Here, I had to change my "input string" because on my debian system, the user scripts seemed to want to be placed in "/usr/local/share/cacti/" The point is wherever you install the scripts, doublecheck your paths to the scripts here.
b. Also check the syntax of the script. It was initially "pathtoscripts/gameserver.php<game><ip><port><query_port>" Checking my logs, it was not using a whitespace between game/ip/port/queryport thus causing the php to crap out. I inserted a whitespace between the <game> <ip> <port> <query_port> thus becoming
Of course, your scripts may not be in the same spot as my system, so modify your pathname as appropriate here.
I believe that's all I did to make mine to work. To add the graph, I had to create a "Data Source" for this.
I selected console -> Data Source -> Select host -> Add
I select "Game Server Status" from the dropdown "selected data template" menu and select the appropriate host then click "Create"
I now have a new data source for my data sources.
On the next page under "Supplemental Data Template Data" I modified this field to be my descriptor for the game. In the custom data section, I replaced warsow with my gametype (example: q3 ), filled in my IP of the game server with appropriate port
Create the Graph:
Console -> Graph Management -> Add
From the "Selected Graph Template" pick the appropriate "Game Server Status" option (I chose "Game Server Status - Players" ) click Create.
I doublecheck that I am using the appropriate templates (game server status - players, and my host), then I title my graph appropriately. I then select my max players from my datasource and my playercount from the new datasource. I click Save and wait the appropriate time for the data to populate.
I'm sorry if this was really really basic, but from the past 4 pages of posts, the majority of posters (like me) didnt have a clue and those who found a clue didnt post their steps. If my steps are confusing or need clarification, let me know, I'll try and follow this thread.
Download and install his scripts per his README.txt (I ignored the unmet dependancy issues from my prior post)
In cacti (with administrative priviledges)
1) Console -> "Data Input Methods" -> Game Server Status
a. Here, I had to change my "input string" because on my debian system, the user scripts seemed to want to be placed in "/usr/local/share/cacti/" The point is wherever you install the scripts, doublecheck your paths to the scripts here.
b. Also check the syntax of the script. It was initially "pathtoscripts/gameserver.php<game><ip><port><query_port>" Checking my logs, it was not using a whitespace between game/ip/port/queryport thus causing the php to crap out. I inserted a whitespace between the <game> <ip> <port> <query_port> thus becoming
Code: Select all
gameserver.php <game> <ip> <port> <query_port>
I believe that's all I did to make mine to work. To add the graph, I had to create a "Data Source" for this.
I selected console -> Data Source -> Select host -> Add
I select "Game Server Status" from the dropdown "selected data template" menu and select the appropriate host then click "Create"
I now have a new data source for my data sources.
On the next page under "Supplemental Data Template Data" I modified this field to be my descriptor for the game. In the custom data section, I replaced warsow with my gametype (example: q3 ), filled in my IP of the game server with appropriate port
Create the Graph:
Console -> Graph Management -> Add
From the "Selected Graph Template" pick the appropriate "Game Server Status" option (I chose "Game Server Status - Players" ) click Create.
I doublecheck that I am using the appropriate templates (game server status - players, and my host), then I title my graph appropriately. I then select my max players from my datasource and my playercount from the new datasource. I click Save and wait the appropriate time for the data to populate.
I'm sorry if this was really really basic, but from the past 4 pages of posts, the majority of posters (like me) didnt have a clue and those who found a clue didnt post their steps. If my steps are confusing or need clarification, let me know, I'll try and follow this thread.
Re: My changed implementation to monitor lots of gameservers
I installed this on a windows box but can seem to get any data in the graphs. Can someone help if you tell me what info you need I will be glad to post it.hangy wrote:Hi all,
I took this nice idea and created a new implementation which supports more games.
For information, installation instructions, license and a list of supported games, please see the README.txt included in the archive.
Sorry I'm new to all of this.
Thanks
-
- Posts: 2
- Joined: Tue Jan 02, 2007 5:37 pm
Hi
I have created a graph as you do in this text below, but I can see the graph, but it's not updateing.
http://89.186.169.200/cacti/graph_image ... 1167965191
I have tryed to run:
php cmd.php
And get this error:
Can any one help me with this?
I have created a graph as you do in this text below, but I can see the graph, but it's not updateing.
http://89.186.169.200/cacti/graph_image ... 1167965191
I have tryed to run:
php cmd.php
And get this error:
Code: Select all
01/05/2007 03:44:35 AM - CMDPHP: Poller[0] Host[1] DS[8] WARNING: Result from CMD not valid. Partial Result: bf289.186.169.200299
01/05/2007 03:44:36 AM - CMDPHP: Poller[0] Host[1] DS[9] WARNING: Result from CMD not valid. Partial Result: bf289.186.169.200299
01/05/2007 03:44:36 AM - CMDPHP: Poller[0] Time: 0.1610 s, Theads: N/A, Hosts: 1
root@stargate:/usr/share/cacti/site#
Bullitt wrote:I've gotten Hangy's templates to work now. The steps I took were as follows:
Download and install his scripts per his README.txt (I ignored the unmet dependancy issues from my prior post)
In cacti (with administrative priviledges)
1) Console -> "Data Input Methods" -> Game Server Status
a. Here, I had to change my "input string" because on my debian system, the user scripts seemed to want to be placed in "/usr/local/share/cacti/" The point is wherever you install the scripts, doublecheck your paths to the scripts here.
b. Also check the syntax of the script. It was initially "pathtoscripts/gameserver.php<game><ip><port><query_port>" Checking my logs, it was not using a whitespace between game/ip/port/queryport thus causing the php to crap out. I inserted a whitespace between the <game> <ip> <port> <query_port> thus becomingOf course, your scripts may not be in the same spot as my system, so modify your pathname as appropriate here.Code: Select all
gameserver.php <game> <ip> <port> <query_port>
I believe that's all I did to make mine to work. To add the graph, I had to create a "Data Source" for this.
I selected console -> Data Source -> Select host -> Add
I select "Game Server Status" from the dropdown "selected data template" menu and select the appropriate host then click "Create"
I now have a new data source for my data sources.
On the next page under "Supplemental Data Template Data" I modified this field to be my descriptor for the game. In the custom data section, I replaced warsow with my gametype (example: q3 ), filled in my IP of the game server with appropriate port
Create the Graph:
Console -> Graph Management -> Add
From the "Selected Graph Template" pick the appropriate "Game Server Status" option (I chose "Game Server Status - Players" ) click Create.
I doublecheck that I am using the appropriate templates (game server status - players, and my host), then I title my graph appropriately. I then select my max players from my datasource and my playercount from the new datasource. I click Save and wait the appropriate time for the data to populate.
I'm sorry if this was really really basic, but from the past 4 pages of posts, the majority of posters (like me) didnt have a clue and those who found a clue didnt post their steps. If my steps are confusing or need clarification, let me know, I'll try and follow this thread.
bf2 89.186.169.200 29900
That the way that it needs to be send to the php file
The problems I have on the moment are:
teamspeak classe doesn't return count players
bf1942 dc doesn't return count & max players
stats working:
bf2
fear
That the way that it needs to be send to the php file
See post bullitIn cacti (with administrative priviledges)
1) Console -> "Data Input Methods" -> Game Server Status
a. Here, I had to change my "input string" because on my debian system, the user scripts seemed to want to be placed in "/usr/local/share/cacti/" The point is wherever you install the scripts, doublecheck your paths to the scripts here.
b. Also check the syntax of the script. It was initially "pathtoscripts/gameserver.php<game><ip><port><query_port>" Checking my logs, it was not using a whitespace between game/ip/port/queryport thus causing the php to crap out. I inserted a whitespace between the <game> <ip> <port> <query_port> thus becoming
Code:
gameserver.php <game> <ip> <port> <query_port>
The problems I have on the moment are:
teamspeak classe doesn't return count players
bf1942 dc doesn't return count & max players
stats working:
bf2
fear
I'm pleased that someone found it useful.bbrother wrote:Yes I have this working with an UT:GOTY server.
1 down, 2 to other servers to go
Hangy and Bullit thank you very much for your time and effort.
Bullit for your small "howto" it helped me out
Re-reading my howto reminds me that I need to document my steps better. I'm terrible at documentation.
Hangy is "the man" I just wrote down what I did as a cacti-novice to make it work.
I have a little problem with this script... It is running when I execute manually the poller.php (cactid or cmd.php). But with the poller.php in a crontab, only this graph doesn't work...
My crontab is the same command :
And in my cacti.sh :
When I run this shell script manually, the graph update nice, but with crontab, nothing :/
I try the .sh for try to correct the problem...
My logs say a "basic" error :
But the output is correct... When I run the poller manually :/
I run Cacti Version 0.8.6j with plugin architecture 1.1
You can see my Cacti on http://cacti.fun-frags.net/graph_view.php
I apologize for my English, I'm French... Very Nice project all the Cacti Template, Script & Plugin, to be continued
My crontab is the same command :
Code: Select all
*/5 * * * * /usr/share/cacti/cacti.sh
Code: Select all
#!/bin/sh
/usr/share/cacti/site/poller.php # /dev/null 2>>/var/log/cacti/poller-error.log
I try the .sh for try to correct the problem...
My logs say a "basic" error :
Code: Select all
08/19/2007 05:45:05 PM - CACTID: Poller[0] Host[18] DS[145] SCRIPT: perl /usr/share/cacti/site/scripts/hls_query.pl 91.121.25.199:27060, output: U
08/19/2007 05:45:05 PM - CACTID: Poller[0] Host[18] DS[145] WARNING: Result from SCRIPT not valid. Partial Result: ...
I run Cacti Version 0.8.6j with plugin architecture 1.1
You can see my Cacti on http://cacti.fun-frags.net/graph_view.php
I apologize for my English, I'm French... Very Nice project all the Cacti Template, Script & Plugin, to be continued
I'm using Hangy's zip file instead of the file linked in the first post. The first graph that I want to do is a player count for TF2 with a maximum. Here's the output from the Graph Debug:
TIA
--
Edit. Never mind. Stupid mistake on my part. Gotta select a data source first!
The output from the Data Source Debug:RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Llama - TF2 Status" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
LINE2:#8D00BA:"Maximum Players" \
GPRINT::LAST:"Current\:%8.2lf %s\n" \
AREA:#FF0000:"Current Player Count" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:
ERROR: parameter '#8D00BA' does not represent a number in line LINE2:#8D00BA:Maximum Players
Can anyone see anything obvious?Data Source Debug
/usr/bin/rrdtool create \
/var/www/localhost/htdocs/cacti/rra/max_players_46.rrd \
--step 300 \
DS:max_players:GAUGE:600:0:1000 \
DS:player_count:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
TIA
--
Edit. Never mind. Stupid mistake on my part. Gotta select a data source first!
BrianF wrote:Hi,
I have this working and would like the graphs to report correct info.
At the moment the game server has 6 player in and the data at the bottom is reporting.
Max Players: 14.00
Current: 6.00
Average: 4.99
Maximum: 6.00
How can I get it to show
Max Players: 14
Current: 6
Average: 4
Maximum: 6
Lose the .00 ????
Please help
Hi,BrianF wrote:Forget last post resolved.
How do you have solved this problem please ?
(iam using the hangy script)
Thx, Curves.
Got the graphs to load, however data is not being populated yet.
Below is what is happening from the Cacti Log File;
This is what is happening when executing it manually from a shell session;
So basically the script its self works, so It may have something to do with the execution of it from within cacti, and how it is trying to save the data and then place it on the graph?
Below is what is happening from the Cacti Log File;
The 4 "Partial Results" are the instances of the servers I'm trying to create graphs for.09/27/2009 04:55:04 PM - SYSTEM STATS: Time:2.2618 Method:cmd.php Processes:20 Threads:N/A Hosts:6 HostsPerProcess:1 DataSources:65 RRDsProcessed:47
09/27/2009 04:55:04 PM - CMDPHP: Poller[0] Host[1] DS[52] WARNING: Result from CMD not valid. Partial Result:
09/27/2009 04:55:04 PM - CMDPHP: Poller[0] Host[1] DS[51] WARNING: Result from CMD not valid. Partial Result:
09/27/2009 04:55:03 PM - CMDPHP: Poller[0] Host[1] DS[50] WARNING: Result from CMD not valid. Partial Result:
09/27/2009 04:55:03 PM - CMDPHP: Poller[0] Host[1] DS[49] WARNING: Result from CMD not valid. Partial Result:
This is what is happening when executing it manually from a shell session;
This is the output from the Data Source Debug;root@webserver:~# php /usr/share/cacti/site/scripts/gameserver.php hl 202.130.34.133 27015
player_count:1 max_players:12
root@webserver:~# php /usr/share/cacti/site/scripts/gameserver.php warsow 202.130.34.133 44400
player_count:0 max_players:16
root@webserver:~# php /usr/share/cacti/site/scripts/gameserver.php warsow 202.130.34.133 44402
player_count:0 max_players:16
root@webserver:~# php /usr/share/cacti/site/scripts/gameserver.php warsow 202.130.34.133 44404
player_count:0 max_players:16
And the RRDTOOL command information;Data Source Debug
/usr/bin/rrdtool create \
/var/lib/cacti/rra/webserver_player_count_49.rrd \
--step 300 \
DS:max_players:GAUGE:600:0:1000 \
DS:player_count:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="WebServer - Game Server Status" \
--base=1000 \
--height=350 \
--width=700 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/webserver_player_count_49.rrd":max_players:AVERAGE \
DEF:b="/var/lib/cacti/rra/webserver_player_count_49.rrd":max_players:LAST \
DEF:c="/var/lib/cacti/rra/webserver_player_count_49.rrd":player_count:AVERAGE \
DEF:d="/var/lib/cacti/rra/webserver_player_count_49.rrd":player_count:LAST \
DEF:e="/var/lib/cacti/rra/webserver_player_count_49.rrd":player_count:MIN \
DEF:f="/var/lib/cacti/rra/webserver_player_count_49.rrd":player_count:MAX \
LINE2:a#8D00BAFF:"Maximum Players" \
GPRINTLAST:" Current\:%8.2lf %s\n" \
AREA:c#FF0000FF:"Current Player Count" \
GPRINT:d:LAST:"Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:f:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:
OK
So basically the script its self works, so It may have something to do with the execution of it from within cacti, and how it is trying to save the data and then place it on the graph?
Who is online
Users browsing this forum: No registered users and 0 guests