marklogicmarklogic-10

Can't see RequestLog.txt for few app servers


We have several databases that store a vast amount of data, which is accessed by multiple web applications.

I want to analyze the request logs for certain databases, but I can't find them in the logs section. However, I can see the Access and Error logs for the same app servers.

Did I overlook any configuration? Can someone assist me in identifying why the request file isn't being generated or help me with the necessary configuration if I've missed something?


Solution

  • MarkLogic Request Monitoring may not be enabled on each of your appservers. It is enabled by default for certain appservers and request thresholds that you may not be exceeding to trigger a log event.

    Do note that there can be performance impacts to logging for each and every request, especially for an extremely high volume system. Triggering a RequestLog event for "expensive" or "slow" events that exceed thresholds and SLA may be a better strategy for production workloads.

    https://docs.progress.com/bundle/marklogic-server-tune-query-performance-11/page/topics/request_monitoring.html#creating-endpoint-declarations

    Request monitoring is enabled by default on the following default MarkLogic application servers:

    • The default App-Services application server, normally Port 8000:
      • For all requests related to the Query Console.
      • For requests with runtime exceeding one second that are not related to the Query Console. This mainly covers the REST Client API.
    • The default Manage application server, normally Port 8002, for requests running longer than one second. This covers the Configuration Manager and Monitoring Dashboard.

    If request monitoring is not already enabled, you can enable request monitoring by calling any server-side JavaScript (.sjs) or XQuery (.xqy) functions in files that reside in the modules directory as declared on the HTTP server via the Admin interface, and you can create other *.api files in the same directory or, if using the file system, in the same subdirectory as the JavaScript or XQuery file being called. For more information on configuring HTTP servers and the modules directory, see the HTTP Servers chapter in the Administrator's Guide.

    https://docs.progress.com/bundle/marklogic-server-tune-query-performance-11/page/topics/request_monitoring.html#app-server-request-monitoring

    You can trigger request logging for an App Server through one or more of the following options:

    • For targeted endpoints (main modules), by switching on monitoring in their endpoint declaration.
    • For all requests on the App Server, by using a special server declaration.
    • By calling request logging APIs in modules. To switch on monitoring for an endpoint, you must add a monitoring section to the App Server Endpoint Declaration file and specify which metrics will be logged. Request monitoring is switched off by default for all metrics.