ns::stats::SQLiteHistory method history configure (public)

 <instance of ns::stats::SQLiteHistory[i]> history configure \
    -pool pool  [ -retention retention ] [ -maxBytes maxBytes ]

Defined in

Validate the database pool and retention limits, initialize the schema and start a separate persistence callback. Repeated configuration with identical settings is harmless; changing active settings requires disabling persistence first. Return the resulting history status. Does not start sampling. Normalize retention to fractional seconds and maxBytes to bytes with ns_baseunit before validating the bounds.

Switches:
-pool (required)
Required dedicated persistent nsdbsqlite pool, accessible to the configuring virtual server.
-retention (optional, defaults to "86400")
Retention duration accepting ns_baseunit time syntax; 60..604800 seconds, default 86400 seconds.
-maxBytes (optional, defaults to "67108864")
Storage budget accepting ns_baseunit size syntax; at least 4 MiB, default 67108864 bytes. Includes database journal headroom.
Returns:
History status dictionary after schema initialization and persistence scheduling.

Testcases:
No testcase defined.
[ show source ]
Show another procedure: