Home > database >  Who has the original teaches people how to write the logstash config file? (text)
Who has the original teaches people how to write the logstash config file? (text)

Time:09-26

See the ELK for some time, and structured into JSON format all the log format, but saw many so-called tutorial or won't write, found online are you copy my, I copy you, is to copy, copy every useful,

Such as, for example, I log all neat became such a format: (originally a line a log, in order to see clearly, I adjusted the format, a total of four log sample), such a configuration file to how to write? (log to save the file first, I use the log4cplus, every day a file name)


[2018-09-05 00:00:00. 467] - logging time, the same below
{
"Pktype" : "GWRX," -- - package type, the same below, four types of package
"Eui" : "6073 bc0002100012",
- identifier"Content" : - content
{
"TMST" : 333974364,
"Nsrecvtime" : "2018-9-5 00:00:00:458",
"Freq" : 483.50,
"Datar" : "SF9BW125,"
"Coder" : "4/5,"
"Rssi" : - 95,
"SNR" : 10.2,
"Frame" :
{
"Type" : "JoinReq,"
"Payloadlen" : 23,
"Toa" : 206000
}
}
}

[the 2018-09-05 00:01:32. 069]
{
"Pktype" : "GWTX,"
"Eui" : "6073 bc0002100012",
"Content" :
{
"Mote" : "004 a770153000003",
"Downtype" : "A",
"TMST" : 17606746620,
"Freq" : 502.50,
"Datar" : "SF12BW125,"
"Coder" : "4/5,"
"Rx" : 2,
"Frame" :
{
"Type" : "the Down - UnCfm,"
"Payloadlen" : 0,
"Toa" : 1156000
}
}
}

[the 2018-09-05 00:01:32. 069]
{
"Pktype" : "moterx,"
"Eui" : "004 a770153000003",
"Content" :
{
"Devaddr" : "c80017d9,"
"Downtype" : "A",
"Appeui" : "2 c26c50065000035,"
"Freq" : 502.50,
"Datar" : "SF12BW125,"
"Coder" : "4/5,"
"Rx" : 2,
"Gweui" : "6073 bc0002100012",
"Frame" :
{
"Type" : "the Down - UnCfm,"
"FCTL" :
{
"Adr" : 1,
"Ack" : 1,
"Fpend" : 0,
"Optlen" : 0
},
"FCNT" : 63204,
"Fport" : 255,
"Payloadlen" : 0,
"Toa" : 1156000
}
}
}

[the 2018-09-05 00:01:00. 401]
{
"Pktype" : "motetx,"
"Eui" : "004 a770019000001",
"Content" :
{
"Devaddr" : "c800012b,"
"Nsrecvtime" : "the 2018-9-5 00:00:59:689",
"Appeui" : "004 a770019000001",
"Freq" : 488.30,
"Datar" : "SF12BW125,"
"Coder" : "4/5,"
"Recvgwcount" : 1,
"Gwlist" :

{
"Gweui" : "6073 bc0001000066",
"Rssi" : - 110,
"SNR" : 1.5
}
],
"Frame" :
{
"Type" : "JoinReq,"
"Payloadlen" : 23,
"Toa" : 1483000
}
}
}


  • Related