nsmcp::SystemLogSummary object method family (public)

 nsmcp::SystemLogSummary[i] family normalized

Defined in /usr/local/ns/tcl/nsmcp/log-summary.tcl

Classify a normalized heading into a broad warning family.

Parameters:
normalized (required)

Testcases:
No testcase defined.
Source code:
switch -- [dict get $normalized category] {
    duplicate-parameter {
        return duplicate-parameter
    }
    scheduler-lateness {
        return scheduler
    }
    log-repeat-marker {
        return log-repeat-marker
    }
}
set heading [dict get $normalized pattern]
foreach {family expression} {
    scheduler {^sched(?: |:)}
    host-validation {^Host validation:}
    http-parser {^HTTP parser:}
    api-documentation {^API documentation:}
    missing-resource {^Missing resource:}
    server-runtime {^(?:Cache:|Certificate configuration:)}
    host-validation {^(?:Ns_ConnLocation: )?(?:ignore.*(?:host header|referrer)|untrusted (?:host|referrer)|someone tried to sneak in an untrusted referrer|Cannot parse provided host header|cannot determine server for request)}
    tls {^(?:invalid request.*received TLS handshake|.*(?:TLS|SSL|STARTTLS) handshake)}
    http-parser {^(?:invalid (?:request|ASTERISK)|REQ BUFFER|SockParse:|request (?:line|header (?:line|field)).*(?:long|missing|more than once)|.*request.line.*pars)}
    name-resolution {^(?:dns:|Ns_?GetHostByAddr|Ns_?GetAddrByHost|getaddrinfo|gethostbyaddr|hostname resolution|reverse.DNS|temporary.*(?:DNS|name.*resolution))}
    api-documentation {^(?:.*invalid (?:API )?(?:proc|procedure) name|.*(?:proc|procedure) name.*invalid|.*API.*(?:source lookup|documentation)|api_proc_documentation:|.*(?:documentation|doc).*title)}
    missing-resource {^(?:.*(?:could not|cannot|failed to|missing|not found).*\.(?:js|css|map)|.*(?:missing|non.existent|not found).*resources? (?:path|directory)|.*(?:file|resource).*not found|rp_sources_filter: file)}
    database {^(?:.*slow.*(?:database|SQL|db operation)|.*(?:database|SQL|db operation).*slow|.*db_.*(?:query|took)|.*(?:search_query|record_view).*took)}
    request-validation {^(?:ad_page_contract:|.*nonstandard (?:form )?variable|.*invalid (?:UTF.8|form|parameter|signature)|.*(?:index\.vuh|disallowed method|rejected POST))}
    application {^(?:.*(?:xowiki|Graphviz|record.shape|flat.edge|serializer|cyclic dependency)|.*deprecated.*folder|.*community.*unavailable|no community info)}
    server-runtime {^(?:.*writing counter is already zero|.*(?:NsWriter|Ns_Writer|writer queue|queue.statistics)|.*unbounded.*create.entry.*wait|.*vhostcertificates)}
} {
    if {[regexp -nocase -- $expression $heading]} {
        return $family
    }
}
return other
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: