Jump to content
Hedius

FailLog [2.0.0.0]

Recommended Posts

Fail Log

For BF3, BF4, BFHL, this plugin logs game server crashes, layer disconnects and Blaze dumps.

The plugin was developed by PapaCharlie9. However, MorpheusX and I (Hedius) modified it.

Download

https://gitlab.com/e4gl/fail-log/-/archive/2.0.0.0/fail-log-2.0.0.0.zip

Description

Each failure event generates a single log line. The log line is written to plugin.log. Optionally, it may also be written to a file in procon/Logs and/or to a Discord server and/or as an email, controlled by plugin settings (see below). Note that this plugin must be run without restrictions (not in sandbox mode) in order to use either the optional separate log file or web log features. The plugin may be run in sandbox mode if both of the optional logging features are disabled.

 

The contents of a log line are divided into fields. The following table describes each of the fields and shows an example:

Field   Description Example
Type   A label that describes the type of failure. The types tracked are game server restarts, Procon disconnects, blaze disconnects, and network congestion to/from Procon. BLAZE_DISCONNECT
UTC   UTC time stamp of the plugin's detection of the failure; the actual event might have happened earlier 20130507_01:52:58
Server   Server name per vars.serverName "CTF Noobs welcome!"
Map   Friendly map name Noshahr Canals
Mode   Friendly mode name TDM
Round   Current round/total rounds 1/2
Players   vars.maxPlayers/previous known player count/current player count 64/63/0
Uptime   Uptime of game server as days.hh:mm:ss 6.09:01:35
Details   All of the information you entered in Section 2 of the settings "Game Server Type, Internal Server ID, Short Server Name"

 

Blaze Disconnect Failures

This plugin uses a heuristic (a guess) to decide if a loss of players indicates a Blaze disconnect failure. The loss of players is calculated on every admin.listPlayers event. These events happen at least once every 30 seconds, but may happen more frequently if you run other plugins. This means that detection of Blaze events is very dependent on your configuration. You may need to adjust the settings of this plugin to detect Blaze disconnects accurately.

 

Settings

Plugin settings are described in this section.

Section 1

General plugin settings.

Debug Level: Number from 0 to 9, default 2. Sets the amount of debug messages sent to plugin.log. Caught exceptions are logged at 3 or higher. Raw event handling is logged at 8 or higher.

Enable Log To File: True or False, default False. If False, logging is only to plugin.log. If True, logging is also written to the file specified in Log File.

Log File: Name of the file to use for logging. Defaults to "fail.log" and is stored in procon/Logs.

Blaze Disconnect Heuristic Percent: Number from 33 to 100, default 75. Not every sudden drop in players is a Blaze disconnect. Also, sometimes a Blaze disconnect does not disconnect all players or they reconnect before the next listPlayers event happens. This heuristic (guess) percentage accounts for those facts. The percentage is based on the ratio of the count of lost players to the last known count of players. For example, if you set this value to 75, it means any loss of 75% or more players should be treated as a Blaze disconnect. If there were 32 players before and now there are 10 players, (32-10)/32 = 69%, which is not greater than or equal to 75%, so no Blaze failure. If there were 32 players before and now there are no players, (32-0)/32 = 100%, a Blaze failure. If you want to only detect drops to zero players, set this value to 100. If the last known player count was less than 12, no detection is logged, even though a Blaze disconnect may have happened. See also Blaze Disconnect Window Seconds.

Blaze Disconnect Window Seconds: Number from 30 to 90, default 30. Normally, listPlayers events happen every 30 seconds and that is normally enough time to detect a Blaze disconnect. However, if you have lots of other plugins running, listPlayer events may happen more frequently than every 30 seconds, which may not be enough time to detect a large enough loss of players. Even if the interval between events is 30 seconds, sometimes a Blaze disconnect takes longer than 30 seconds to complete. This setting allows you to adjust the plugin to handle those situations. If you notice loss of players that you suspect are Blaze disconnects but no failure is registered, increase this value. Try 60 at first and if that isn't enough, add 15 seconds and try again, until you get to the max of 90 seconds.

Enable Restart On Blaze: True or False, default False. If True, the game server will be restarted with an admin.shutDown command when a Blaze disconnect is detected and the remaining number of players is zero. Use with caution!

Restart On Blaze Delay: Number, default 0. Time in seconds to wait before invoking the admin.shutDown command after a Blaze disconnect. Use with caution, since most servers get messed up or don't save progress properly after a Blaze disconnect, so instant restarts would be advised. Setting it to 0 instantly executes the command.

Enable Email On Blaze/Crash: True or False, default False. If True, the plugin will send a notification-email if your server blazes or crashes (see settings below). Make sure to disable the sandbox or allow SMTP-connections and your mailserver + mailserver-port in the trusted hosts.

Enable Discord Webhook On Blaze/Crash: True or False, default False. If True, the plugin will send a notification to a Discord webhook if your server blazes or crashes (see settings below). Make sure to disable the sandbox.

Min Online Players For Restart (Crash) Notification: Number from 0 to 64, default 4. The minimum amount of online players to classify a server restart as a server crash.

 

Section 2

These settings fully describe your server for logging purposes. Information that can't be extracted from known data is included. All of this information is optional.

Game Server Type: Type of game server, defaults to BF4.

Internal Server ID: Number from 0 to 20, default 1. Your internal server id.

Short Server Name: A short version of your server's name. E.g.: #1 Locker

 

Section 3

These settings configure the BlazeReport-mail being sent. The following values can be entered as wildcards at the email-subject and email-body and will be replaced: %id%, %gameservertype%, %shortservername%, %servername%, %serverip%, %serverport%, %utc% / %time%, %players%, %map%, %gamemode%, %round%, %uptime%, %type%.

Email Recipients: List of email-addresses to send the notifications to, one each line.

Email Sender: Email-Address being displayed in the 'From:' field.

Email Subject: Subject of the notification-email. You can use the values listed above to add information about the BlazeReport.

Email Message: Body of the BlazeReport-email, can be fully styled with HTML. You can use the values listed above to add information about the BlazeReport.

SMTP Hostname: Hostname/IP-Address of the SMTP-server used to send email.

SMTP Port: Number between 0 and 65535, default 25. Port of the SMTP-Server used to send email.

SMTP Use SSL: True of False, default true. Toggles the usage of SSL for the connection to your SMTP-server.

SMTP Username: Username used to identify with your SMTP-server.

SMTP Password: Password used to identify with your SMTP-server.

 

Section 4

These settings configure the BlazeReport-Discord embed notification being sent. The following values can be entered as wildcards at the Message-subject and Message-content and will be replaced: %id%, %gameservertype%, %shortservername%, %servername%, %serverip%, %serverport%, %utc% / %time%, %players%, %map%, %gamemode%, %round%, %uptime%, %type%.

Webhook Author: The author of the discord notification, default FailLog.

Use Custom Webhook Avatar: True or False, default False. Define a custom webhook avatar or use the default avatar.

Webhook Avatar URL: Full URL for the webhook avatar.

Webhook Title: Title of the discord notification. You can use the values listed above to add information about the BlazeReport.

Webhook Colour Code: Number, default 0xff0000 (red). Colour of the discord embed notification.

Webhook Content: Content of the discord notification. You can use the values listed above to add information about the BlazeReport.

Discord Webhook URL: Full URL of your Discord webhook.

 


Development

This plugin is an open source project hosted on GitLab.com. The repo is located at https://gitlab.com/e4gl/fail-log and the master branch is used for public distributions. See the Tags tab for the latest ZIP distributions. If you would like to offer bug fixes or new features, feel free to fork the repo and submit pull requests.

Edited by Hedius

Share this post


Link to post

Changelog for version 2.0.0.0:

  • remove the deprecated web log module
  • add support for Discord webhooks
  • Also send emails and discord notifications for crashes
  • new variables for messages: %type% (Error type), %id%, %shortservername%
  • new update check
  • several minor fixes

Share this post


Link to post

Development

This plugin is an open source project hosted on GitLab.com. The repo is located at https://gitlab.com/e4gl/fail-log and the master branch is used for public distributions. See the Tags tab for the latest ZIP distributions. If you would like to offer bug fixes or new features, feel free to fork the repo and submit pull requests.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 10 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 6 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.