Forum

Results 1 to 1 of 1
  1. #1
    Join Date
    September 2016
    Posts
    1

    [MySQL][Logs] User Event Counter

    User Event Counter

    What's that!?

    It's a java (multiplatform!) application (console only) that analyses the TeamSpeak logs.

    For all Users on the server / in the logs of your TeamSpeak,
    it counts how often:

    • A User lost connection
    • A User got kicked
    • A User has kicked someone else
    • A User got banned
    • A User has banned someone else
    • more to come..


    And sends all that data to a MySQL Server.

    It checks the logs folder of your TeamSpeak and analyses all logs and keeps the Database auto-updated.

    But why?!
    We implemented a Badge System in our TeamSpeak,
    with PHP-Query Clients we are able to give badges (Server Groups) to clients based on Events,
    Online Time, Connection amount etc. (And now the ones seen above).

    We implemented them into the http://ts-n.net/ranksystem.php Ranking System - which by the way looks just gorgeous.

    It's just a funny addition to all your TeamSpeak servers, and after all, statistics are always fun to look at.


    Installation

    Requirements
    • A MySQL Server with at least 1 Database
    • A table with the correct setup (see below)
    • Access to the TeamSpeak log folder



    Put the auto_update.jar in your TeamSpeak root folder, or in the directory where the /logs folder is saved in (not (!) IN the logs folder.)


    Table setup

    The MySQL Table has to have the following structure:
    http://pastebin.com/wLAbSmDP

    Auto-Load settings (optional)

    Save the following template to a file called:
    Code:
    auto_update_settings_<SettingsID>.txt
    - Where SettingsID is the one you use to start the program, or you entered at startup.

    Code:
    ;The host IP of the MySQL Server (if the mysql server runs on the same machine as the autoupdater, enter either 127.0.0.1 or localhost)
    mysql_host = <host>
    ;The port the MySQL server listens to (Most likely 3306)
    mysql_port = 3306
    ;The username used to log into the MySQL server
    mysql_user = <user>
    ;The password used to log into the MySQL server with given username
    mysql_pw = <password>
    ;The database to select when logged in
    mysql_db = <database>
    ;The table to save the data into (See the TABLE STRUCTURE tab for more info on how to set that up)
    mysql_table = <tablename>
    ;The virtual server id of the Teamspeak server, used to identify the differentiate the logs
    virtual_id = <virtualserver-id>
    How to Use

    Code:
    Console Usage:
    java -jar auto_update [<bool: Update Everything (true/false)> <SettingsID>]
    Update Everything:
    Used at the first startup mostly, if you want to analyse ALL events in the past until now. It will analyse ALL logs for your virtual server and update (rather fill) your table in the MySQL Database.

    After first startup you should set this to false.

    SettingsID:
    The Settings ID of the
    Code:
    auto_update_settings_<SettingsID>.txt
    File, where your settings are stored in. No more questions will be asked on startup now. (If no syntax error appears in the settings file)


    Auto-Update
    The application has the following features:
    • Updates the Database every 60 seconds
    • Always uses the latest log file, even if the TeamSpeak restarted and a new log is created.
    • Auto-reconnect to the MySQL server if connection lost
    • Uses the latest log file and the saved linenumber to only analyse NEW data




    Leave feedback and post your opinions!


    Cheers,


    revide.
    Attached Files Attached Files
    Last edited by revide; September 17th, 2016 at 04:51 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to see the error logs of my Mysql
    By elremolino in forum macOS
    Replies: 2
    Last Post: March 19th, 2014, 01:14 PM
  2. [Resolved] I want the User does not see the server logs.
    By Abraao santos in forum Permission System
    Replies: 5
    Last Post: December 21st, 2011, 12:35 PM
  3. Unknow user logs in and out
    By Miscni in forum General Questions
    Replies: 4
    Last Post: August 24th, 2010, 11:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •