Jump to content
FR:MP Dev Update #1: Mechanics & Overview ×
  • Welcome, Guest!

    Welcome to GTAPoliceMods — the premier destination and ultimate hub for all things emergency modding. Discover the latest mods for GTA and FiveM, connect with a supportive community, and access quality resources to enhance your GTA experience.

    Log in or sign up to download a vast selection of mods, upload your own creations, and engage with fellow enthusiasts.

ServerStatusPingFiveM 2.0

   (0 reviews)

3 Screenshots

DM-ServerStatusPingFiveM

DM-ServerStatusPingFiveM is a FiveM script designed to enhance your server's uptime monitoring by pinging a status logger endpoint (e.g., BetterStack) and sending notifications to a Discord channel. This ensures your server status is always accurately monitored.


Features

  • Ping Status Logger: Automatically pings a provided URL at regular intervals for uptime tracking.
  • Discord Integration: Sends status notifications to a Discord Webhook.
  • Alternating Pings: Alternates between sending pings to the logger endpoint and Discord notifications.
  • Configurable Intervals: Easily adjust the ping frequency in the configuration file.
  • Custom Headers: Supports custom headers (e.g., API tokens) for added flexibility.
  • Lightweight: Minimal resource impact on your server.

Installation

  1. Download and Extract:

    • Download the script and place the folder DM-ServerStatusPingFiveM into your resources directory.
  2. Configure:

    • Open the config.lua file.
    • Replace Config.StatusLoggerURL with your status logger endpoint (e.g., BetterStack heartbeat URL).
    • Replace Config.DiscordWebhookURL with your Discord Webhook URL.
    • Adjust Config.PingInterval (in milliseconds) to set the frequency of pings. Default is 1 minute (60000 ms).
    • Add or modify headers in Config.StatusLoggerHeaders and Config.DiscordHeaders if required.
  3. Add to Server Configuration:

    • Open your server.cfg file.
    • Add the following line:
      ensure DM-ServerStatusPingFiveM
  4. Start the Server:

    • Start your FiveM server to initialize the script.

Notes

  • The script alternates between sending pings to the status logger and Discord notifications to optimize efficiency.
  • Ensure the URLs and tokens provided in the config.lua file are valid and active.

Edited by DeputyRyan
Desc Edit


What's New in Version 2.0   See changelog

Released

Change Log: DM-ServerStatusPingFiveM v2.0

Added

  • Discord Integration: Sends status notifications to a Discord Webhook.
  • Alternating Pings: Alternates between sending pings to the status logger and Discord every interval.

Improved

  • Enhanced Comments: Added detailed comments for better code readability and maintenance.

Fixed

  • None in this release.

Removed

  • None in this release.

FAQ: DM-ServerStatusPingFiveM

What is DM-ServerStatusPingFiveM?

DM-ServerStatusPingFiveM is a FiveM script designed to send periodic pings to status logger endpoints (e.g., BetterStack) to keep your server's uptime status updated.


How do I configure the script?

Edit the config.lua file to:

  • Set the StatusLoggerURL to your status logger's endpoint.
  • Adjust the PingInterval to control how often the script sends pings.
  • Add any required headers, such as API tokens.

Which services does this support?

The script is compatible with any status logging service that accepts HTTP requests, such as BetterStack, UptimeRobot, or other monitoring platforms.


What payload does the script send?

The script sends a simple JSON payload ({status: "online"} by default) to indicate the server is operational. This can be modified in server.lua.


What happens if the endpoint is down?

If the endpoint is unreachable or returns an error, the script will log a failure message and the HTTP status code in the server console.


How do I troubleshoot issues?

  1. Verify the StatusLoggerURL is correct.
  2. Ensure the FiveM server has an active internet connection.
  3. Check the server console for error messages or status codes.
  4. Confirm the headers and payload match the status logger’s requirements.

Where can I get support?

For support, visit:


Can I contribute to the project?

Yes! Contributions are welcome. Fork the project on GitHub, make your changes, and submit a pull request.

Author

  • Author: DeputyRyan - DeputyMods

User Feedback

Recommended Comments

There are no comments to display.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Add a comment...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Welcome to GTAPoliceMods! By using our platform, you agree to our Terms of Use, Privacy Policy, and our Guidelines. 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.