Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.7 KB

README.md

File metadata and controls

32 lines (27 loc) · 1.7 KB

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