flashaudit-node-client
A package used in our products to send audit and in the future general logs to a central & monitorable endpoint
javascript usage:
const FlashAudit = require('@anlix-io/flashaudit-node-client')
const flashAudit = new FlashAudit.FlashAudit({
client: 'anlix',
product: 'flashman',
serverBrokers: ['mycompany.kafka.net:8082'],
sslEnabled: true,
auth: {
username: 'myuser',
password: 'mypassword'
},
runtimeValidation: true,
})
flashAudit.sendCreate({
user: {
id: 'ABCdefGHI',
name: 'foobar',
},
object: 'cpe',
searchable: ['abc', 'myssid', 'myverysecretpassword'],
values: {
'whateveritis': 1111,
'wifi_config.ssid': 'myssid',
'wifi_config.password': 'myverysecretpassword',
'mysubobject': {
'subkey0': {
'name': 'name0',
'key': 'subkey0',
'timestamp': 1000,
},
'subkey1': {
'name': 'name1',
'key': 'subkey1',
'timestamp': 2000,
}
}
}
})
.then( function(err) {
if (err) {
console.error(err);
}
})