Log Management

Objective :

we need to manage the log of the server and control it from the dashboard and apply some cases as well.

to do that we use the ETW log listener logic inside the Bootstrapper (BallisticServerAgent) solution where the BS will control it and it’s parameters and control running it and the location of the files.

the idea is using the MemoryRingBuffer design pattern where the logs will store in the memory until reach such count or until error happened then the logs will be written inside the log file in the VM that has the BS and in the location that the BS specify.

the dashboard with the API helping will control this process as the case need.

From the servers dashboard, we want the ability to manage server logs.

  •  Show the number of log files and their total size and other data.
  • Clear ballistic logs. This will delete all the ballistic server logs from the server (except the currently active log file, since it will probably be locked).
  •  Acquire logs. The bootstrapper will upload the logs to a blob and share its URL. The URL link should remain visible on the dashboard (in any session) until a new acquire operation is started.

 

API of LogManagemnet

  1. POST /api/LogManagement
    By this API  the log files metadata are stored in the table “NodeLogMetadata“.the caller (BS) will send a list of “FileMetadata” to this API.
  2. GET /api/LogManagement
    By calling http://api.wartothecore.com/api/LogManagement?serverId=value the list of metadata of the log files will be received.
  3. PUT /api/LogManagement
    if needed to update data of one log file we will send the updated object to this API.
  4. DELETE /api/LogManagement
    to delete metadata of a specific file, you should send the file name and server-id the belongs it to this API to do that.

LogManagementCommand

The objective of this part: is the Command that can be applied on the node to control its logs.

where we have :

  • “Flush” command is used in: Trigger a memory to buffer flush.
  • “Aquire” command is used in Store the log file in the blob.
  • “Delete” command is used in: Delete the log file from the blob.

    API of LogManagemnet/Commands

  1. POST /api/LogManagement/Commands
    This API used to save one of the above commands in the table to can apply it by the client (BS)later.
    the table name is: “LogManagementCommandInfo
    the requester is the website in this case.
  2. GET /api/LogManagement/Commands
    to get the commands that stored by specific server-id.
    the requester is the BS in this case and the BS every 60-sec checks if there any new commands or not to execute them.
  3. DELETE /api/LogManagement/Commands
    To delete the command that applied already by the node to can not repeat it again.

API of LogManagement files :

POST /api/LogManagement/LogFile
This Api used to store the log file itself in the blob.

GET /api/LogManagement/LogFile

To can read the file directly from the storage  that happened only in the dashboard website  by admin login

we use this API to return SAS token where this URI is secured enough to point to the file without damage it.

Comments

comments

Published
Categories Internal
Views 318
War to the Core

Recent Comments

Latest Updates

  • Solo missions

    Solo missions

    Hey guys, here are the specifics of the first two solo missions, those are sketches of the first two missions. First mission: A harvester is placed near the ship, generating supply caches. The player collects energy caches and escapes a ring of mines. No supply links allowed. The sensor component is introduced by one of […]Read More »
  • We made it to the Top 100!

    We made it to the Top 100!

    We are stoked that we managed to land on IndieDB’s Indie of the Year’s Top 100 list! We are also the only MOBA that made it to the list! The support we got from the community was overwhelming, and we would like to thank each and every person that helped us get this far. Whether […]Read More »
  • Full Campaign Series, Version 3

    Full Campaign Series, Version 3

    Characters: Daniel Blaze. Protagonist, player-character. Headstrong and rebellious. Ambiguous loyalty to the Shepherd Coalition. Joseph Blaze. Father of Daniel Blaze. Commander of the Leviathan mothership until executed for treason by the Shepherd Coalition. Sylvia. AI assistant. Provides intel, advice, mission objectives. Captain Zhukov. Cyborg commander assigned to hunt down player during the first several missions. […]Read More »
  • Story: Episode 1, Version 2

    Story: Episode 1, Version 2

    The Blaze family had long been controversial. They supported the Shepherds, but continually frustrated the Orthodox elements of their faction. Joseph Blaze was especially known for his tolerance of the weakling families that used genetic engineering to alleviate the sicknesses that exposure to the Earth’s surface had inflicted on them. Such tensions between orthodoxy and […]Read More »
  • Story: Episode 1

    Story: Episode 1

    Location: The Pole Base. When Daniel Blaze passed his final test and became the primary candidate to pilot the Leviathan, the Shepherds’ newest ship, he caused a quite a stir. Not because he’s the youngest member of the Pole fleet to be nominated for admiralship, the faction had already made peace with this as a […]Read More »
Skip to toolbar