Skip to content

iam-rj/Ptero-Status

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ptero-Status

About

PteroStatus is an easy to setup pterodactyl daemon status project. It will continuously update a discord embed with live stats from your daemons.

Preview

Preview

Installation

Run the following command to install the npm package

npm i pterostatus

Usage

Node:

const Status = require('pterostatus');

const Daemon = new Status.Daemon("Node1", 15000, {
    ip: "CONTROLLER-IP",
    port: "CONTROLLER-PORT"
});

Panel:

const Status = require('pterostatus');

const Controller = new Status.Controller(4000, {
    token: "BOT-TOKEN",
    guildID: 'GUILD-ID',
    channelID: 'CHANNEL-ID',
    color: '#06cce2', // Embed color
    pterodactyl: {
        panel: "https://panel.domain.com",
        apiKey: "API-KEY",
    },
    node: {
        message: '**{node.name}**: [Memory: {node.memory.used/{node.memory.total}] [Disk: {node.disk.used}/{node.disk.total}]',
        online: '🟢 **ONLINE**',
        offline: '🔴 **OFFLINE**'
    },
    embed: {
        color: '#06cce2',
        title: 'Node Status [{nodes.total} nodes]',
        description: '**Nodes**:\n{nodes.list}\n\n**Total**:\nMemory: {memory.used}/{memory.total}\nDisk: {disk.used}/{disk.total}\n\n**Pterodactyl:**\nUsers: {pterodactyl.users}\nServers: {pterodactyl.servers}',
        footer: {
            text: 'Last updated: {lastupdated}',
            icon: 'https://i.imgur.com/9b1qwml.jpg'
        }
    },
    interval: 15000
});

Placeholders:

NODE:
{node.name} - Node's name
{node.memory.used} - Total node's memory
{node.memory.total} - Total used memory
{node.disk.used} - Total used disk
{node.disk.total} - Total node's disk
{node.cpu.used} - Total used cpu
{node.cpu.cores} - Total cpu cores
{node.cpu} - Displays the cpu model
{node.os} - Displays the os
{node.status} - Shows if it's online or offline

NODES:
{nodes.online} - Number of online nodes
{nodes.offline} - Number of offline nodes
{nodes.list} - List of nodes along with their statuses
{nodes.total} - Number of total nodes

TOTAL:
{memory.total} - Total memory
{disk.total} - Total disk
{cores.total} - Total cores

USED:
{memory.used} - Total memory used by nodes
{disk.used} - Total disk used by nodes
{memory.used%} - Total memory percentage used by nodes
{disk.used%} - Total disk percentage used by nodes

PTERODACTYL:
{pterodactyl.users} - Number of current panel users
{pterodactyl.servers} - Number of current panel servers
{pterodactyl.locations} - Number of current panel locations

DATES:
{lastupdated} - Last updated time
{lastupdated.date} - Currently day of the month
{lastupdated.month} - Current month of the year
{lastupdated.hours} - Current hour of the day
{lastupdated.minutes} - Current minute of the hour
{lastupdated.seconds} - Current second of hour
{lastupdated.year} - Current year

Support

Need some help setting up Ptero-Status? Join BlueFox Development's Discord

https://discord.gg/KHbBfWSdnZ

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%