[logs] some minor fixes

hide files on remote like with archives
fix vmw_log pattern
fix an NPE
pull/884/head
Timothy Stack 3 years ago
parent 02167e2caf
commit b77367a3d3

@ -6,7 +6,10 @@
"url": "http://kb.vmware.com/kb/2004201",
"regex": {
"6.0+": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+) (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\] \\[(?<src>[^ \\]]+)\\s*(?: sub=(?<sub>.+?))?(?: opI(?:D|d)=(?<opid>[^ \\]]+))?(?: user=(?<user>[^ \\]]+))?\\]\\s*(?<body>.*)(?:\\n.*)?$"
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+) (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\] \\[(?<src>[^ \\]]+)\\s*(?: sub=(?<sub>.+?))?(?: opI(?:D|d)=(?<opid>[^\\]]+))?(?: user=(?<user>[^ \\]]+))?\\]\\s*(?<body>.*)(?:\\n.*)?$"
},
"6.0+-nosrc": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?<level>\\w+) (?<prc>[\\w\\-]+)\\[(?<tid>\\w+)\\] \\[(?:opI(?:D|d)=(?<opid>[^\\]]+))\\]\\s*(?<body>.*)(?:\\n.*)?$"
},
"section": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2})) (?:- last log rotation time, \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}(?:Z|[-+]\\d{2}:\\d{2}))?\\s*(ESX KMX Agent started.|Section for VMware VirtualCenter,.*|- time the service was last started(?: \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z)?, Section for (?:[^,]+), pid=(?<tid>\\w+).*)"
@ -129,6 +132,9 @@
},
{
"line": "2021-06-03T16:50:32.890Z - time the service was last started 2021-06-03T16:50:32.884Z, Section for VMware Update Manager, pid=5916, version=7.0.3, build=0, option=DEBUG"
},
{
"line": "2021-06-16T14:59:52.362Z info vsand[1000083783] [opID=MainThread VsanMgmtSvcMain::_PatchPyVmomi] Python 3.8.8 (default, Jun 1 2021, 03:16:39) [GCC 4.6.3] on VMkernel, optimize: 0, recursionLimit: 300"
}
]
}

@ -628,6 +628,8 @@ logfile_sub_source::rebuild_result logfile_sub_source::rebuild_index(nonstd::opt
ld.ld_lines_indexed,
last_indexed_line,
new_file_line.get_time_in_millis(),
last_indexed_line == nullptr ?
(uint64_t) -1 :
last_indexed_line->get_time_in_millis());
if (retval <= rebuild_result::rr_partial_rebuild) {
retval = rebuild_result::rr_partial_rebuild;

@ -668,7 +668,9 @@ void tailer::looper::host_tailer::loop_body()
fc.fc_file_names[lpath_str]
.with_filename(custom_name)
.with_source(logfile_name_source::REMOTE)
.with_tail(loo.loo_tail);
.with_tail(loo.loo_tail)
.with_non_utf_visibility(false)
.with_visible_size_limit(256 * 1024);
update_active_files(fc);
});
}

Loading…
Cancel
Save