Skip to content
Kadupul is pre-alpha. Validate these procedures in an isolated test installation.

Logging

Kadupul uses a common application logging function for many web, poller and maintenance messages. The destination can be a file, syslog/eventlog, or both. Collector process output and queued measurements are separate. Individual callers can also write to other files or standard output.

Setting Default Holds
path_cactilog <base path>/log/cacti.log The application log.
path_stderrlog <base path>/log/cacti_stderr.log Standard output and standard error of collector processes.
log_destination 1 Where log lines go.

log_destination:

Value Meaning
1 Logfile only
2 Logfile and syslog or eventlog
3 Syslog or eventlog only

An empty path_cactilog falls back to <base path>/log/cacti.log rather than disabling the log.

2026-09-10 14:02:17 - WEBUI NOTE: some message text
Part Source
Timestamp CACTI_DATE_TIME_FORMAT when defined, otherwise Y-m-d H:i:s. Written in the system timezone, not the browser’s.
Environment The environ argument, defaulting to CMDPHP.
Message The caller’s text, with line breaks collapsed.

Poller lines carry more:

2026-09-10 14:02:17 - POLLER: Poller[1] PID[28114] some message text

A message that is empty or only whitespace is discarded before anything else happens.

The tag is a free string, so plugins add their own. The ones a stock install produces most often:

Tag Written by
POLLER poller.php and the collectors.
CMDPHP Default for anything that does not set a tag.
WEBUI The web interface.
AUTH, SECURITY Login, session and permission events.
SYSTEM Maintenance and system-level events.
BOOST The boost RRD update path.
AUTOM8 Automation and discovery.
IMPORT, UPGRADE Template import and database upgrade.
MAINT poller_maintenance.php, including log rotation.
SNMP, PING Collection protocol failures.
REPLICATE Remote data collector synchronisation.
DBCALL, DSTRACE, DSDEBUG Developer diagnostics.

Tags matter because the log viewer’s filters match on message text, not on the tag. Filtering by tag means filtering on the string.

log_verbosity, defaulting to 2:

Value Name Includes
1 NONE No application logfile output. Eligible classified messages may reach syslog if selected.
2 LOW Statistics and errors.
3 MEDIUM Statistics, errors and results.
4 HIGH Statistics, errors, results and major I/O events.
5 DEBUG Statistics, errors, results, I/O and program flow.
6 DEVEL Developer debug level.

Each cacti_log() call may carry a level. The rules:

  • A call with no level is always logged.
  • At verbosity 1 through 5, a call is logged when its level is at or below the configured verbosity.
  • Setting log_verbosity to 1 suppresses the application logfile completely. Syslog is still possible for calls that pass the per-call level gate and match an enabled syslog class. A level above the configured verbosity returns before either destination is considered.

DEVEL is not a superset. At verbosity 6, calls tagged DEVEL are logged and calls at LOW or below are logged, but calls tagged MEDIUM, HIGH and DEBUG are suppressed. DEVEL is a separate channel for developer tracing, not one more step up the ladder.

Anything above LOW fills a disk quickly on a system of any size. The setting’s own description says so.

Reached when log_destination is 2 or 3. Classification is by substring match on the message, then by whether that class is enabled:

Substring in message Class Setting Default Syslog priority
ERROR: error log_perror on LOG_CRIT
WARNING: warning log_pwarn off LOG_WARNING
STATS: statistic log_pstats off LOG_INFO
NOTICE: notice log_pstats off LOG_INFO

A message carrying none of those four markers never reaches syslog, at any destination setting. Messages are logged under the identifier Cacti, with facility LOG_SYSLOG on Unix and LOG_USER on Windows.

Three settings raise the level for part of the system without raising it globally. Use these instead of turning the whole log to DEBUG.

Setting Selects by Effect
selective_debug File name Calls from matching entry scripts bypass the per-call level gate; this does not change their stored level or destination.
selective_plugin_debug Plugin directory Calls from matching plugin entry paths bypass the per-call level gate; this does not change their stored level or destination.
selective_device_debug Device id Every call about the named devices is logged during collection.

selective_debug and selective_plugin_debug are multi-select lists in the interface. The match is computed once per PHP process and cached. A running process may continue using its earlier selection; a fresh process reads the new setting.

selective_device_debug is a comma-separated list of device ids held in one setting, and the form caps the field at 30 characters. That leaves room for a handful of devices; it is a troubleshooting tool, not a policy.

During collection, cmd.php replaces the log level of every message about a listed device with POLLER_VERBOSITY_NONE, which is the lowest value and so always passes the verbosity gate. The effect is that one device is logged in full while the rest of the system stays at its configured level.

It applies during collection only. The web interface does not consult it.

Add and remove devices from the device list actions rather than by editing the setting text, which keeps the list well formed.

Rotation is done by poller_maintenance.php, not by the system logrotate, unless you turn it off.

Setting Default Meaning
logrotate_enabled on Rotate at all.
logrotate_frequency 1 1 every day, 7 every seven days, 30 every thirty days.
logrotate_retain 7 Age in days before dated rotations are removed, not a file count. 0 disables age cleanup. A negative/blank value falls back to 7; values above 365 are capped.

The application log is rotated; the collector output file is included when path_stderrlog is configured. Rotation runs when maintenance checks its schedule, so the date suffix need not match the most recent contents.

The rotated name is the log path with yesterday’s date appended:

cacti.log-20260909
cacti.log-20260909-1

The -1 form appears when the first name already exists, counting up to 99.

Rotation preserves the original file’s owner, group and permissions on the new empty file. It logs a LOGMAINT STATS: line recording how many files were rotated and removed.

Setting $disable_log_rotation = true; in config.php skips the built-in rotation entirely, which is the option to use when a distribution package installs its own logrotate.d rule. It is a file setting, not a database setting, so a packager can set it without touching a running install’s data.

Cleanup removes only files named exactly as rotation creates them, the log basename followed by -YYYYMMDD and an optional -N suffix; other files in the directory are left alone.

When rotation cannot proceed it says why rather than failing silently. A missing file logs “Skipped missing”; an unwritable file or directory logs a permissions error naming the path.

The interface selects the latest matching lines. Its implementation scans the file to count matches, then reads again to return the selected page. Filters match the complete line, including the environment tag:

Value Filter Matches on
-1 All everything
1 Stats STATS
2 Warnings WARN
3 Warnings++ WARN, ERROR, DEBUG, SQL
4 Errors ERROR
5 Errors++ ERROR, DEBUG, SQL
6 Debug DEBUG, excluding SQL
7 SQL Calls SQL
8 AutoM8 AUTOM8
9 Non Stats everything without STATS
10 Boost BOOST
11 Device Up/Down HOST EVENT, ] is recovering!, ] is down!
12 Recaches ASSERT FAILED, Recache Event

These are substring tests against the whole line. A message containing the word ERROR anywhere shows under Errors regardless of what wrote it.

Setting Default Effect
log_refresh_interval 60 seconds How often the tail view refreshes.
clog_exclude empty Regular expression whose matches are hidden from the viewer. Hides lines from display; does not stop them being written.

The “All Lines” choice in the viewer is capped by a separate setting, defaulting to 1000 lines, so “all” means “the last thousand” unless that is raised.

The application log is not the poller output

Section titled “The application log is not the poller output”

Three different things get called “the poller log”. They are separate.

Thing Where Contains
Application log path_cactilog Application messages routed to the file by destination and verbosity settings, including many poller statistics and errors.
Collector standard error path_stderrlog Output redirected from launched collector processes when a path is set on Unix.
Poller output poller_output table Collected values awaiting RRD processing. Acknowledged rows are removed; failed or deferred rows can remain queued.

A missing value need not leave an entry in every destination. Check the application log at the configured verbosity, collector output if redirection is enabled, and the pending or rejected output queues. A failed collection may produce a warning, an unknown value, no row, or a retained row depending on the path; inspect the relevant collector diagnostics before drawing a conclusion.

The standard error redirect is appended with >> and only set up on non-Windows systems, and only when path_stderrlog is non-empty. On Windows, this redirect is not configured by this launcher; the fate of collector output depends on how the process is started.

spine_log_level controls how much the spine collector says about values it could not use:

Value Meaning
0 None. No error counts.
1 Summary. Count of output errors per device.
2 Detailed. Every error.

It defaults to 0, so Spine does not emit its optional invalid-output summary by default. Other checks and log paths may still report errors.

Documentation license: CC BY-SA 4.0Site code license: GPL-3.0-or-laterKadupul is not affiliated with or endorsed by The Cacti Group.