Skip to content

Sending QBCore Logs to Elastic Search System For better logging

License

Notifications You must be signed in to change notification settings

nkyo/nk-qb-logs-elk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nk-qb-logs-elk

Sending QBCore Logs to Elastic Search System For better logging

Why I'm using ELK for store logs?

  • No rate limit like discord, slack
  • Better logs filter, finder
  • Using your own server with local transport - with zero delay
  • Can be using as DataSource for Grafana to display Dashboard 😎
Just see the sample images

How to use?

Just using same QB-Logs Event Sample:

TriggerEvent('elk-log:server:elk', PlayerID, Citizenid, "Action", "Action Detail", IsDanger(true/false))

example in inventory:

TriggerEvent('elk-log:server:elk', ''.. GetPlayerName(source) ..'', ''.. Player.PlayerData.citizenid ..'', 'AddItem', '**' .. GetPlayerName(source) .. ' (citizenid: ' .. Player.PlayerData.citizenid .. ' | id: ' .. source .. ')** got item: [slot:' .. slot .. '], itemname: ' .. Player.PlayerData.items[slot].name .. ', added amount: ' .. amount .. ', new total amount: ' .. Player.PlayerData.items[slot].amount)

Example in Players with ELK Logs and Tag in Discord Webhook:

TriggerEvent('elk-log:server:elk', ''.. GetPlayerName(self.PlayerData.source) ..'', ''.. self.PlayerData.citizenid ..'', 'AddMoney', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason, true)

Using ELK Docker in this repository

https://github.com/nkyo/elk-docker-compose

About

Sending QBCore Logs to Elastic Search System For better logging

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages