{"record":{"id":"ec1c13603a11054d","repo":"stamparm/maltrail","slug":"invalid-configuration-value-for-update-period","errorCode":null,"errorMessage":"invalid configuration value for 'UPDATE_PERIOD' ('{}')","messagePattern":"invalid configuration value for 'UPDATE_PERIOD' \\('(.+?)'\\)","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"sensor/src/config.rs","lineNumber":801,"sourceCode":"        for endpoint in split_endpoints(&syslog_server) {\n            if parse_host_port(endpoint).1.is_none() {\n                bail!(\"invalid configuration value for 'SYSLOG_SERVER' ('{endpoint}')\");\n            }\n        }\n        let logstash_server = get_str(&raw, \"LOGSTASH_SERVER\");\n        for endpoint in split_endpoints(&logstash_server) {\n            if parse_host_port(endpoint).1.is_none() {\n                bail!(\"invalid configuration value for 'LOGSTASH_SERVER' ('{endpoint}')\");\n            }\n        }\n        let remote_severity_regex = get_str(&raw, \"REMOTE_SEVERITY_REGEX\");\n        if !remote_severity_regex.is_empty() && crate::pyre::build_fancy(&remote_severity_regex).is_err() {\n            bail!(\"invalid configuration value for 'REMOTE_SEVERITY_REGEX' ('{remote_severity_regex}')\");\n        }\n\n        let update_period = match get_u64(&raw, \"UPDATE_PERIOD\") {\n            Some(v) => v,\n            None => bail!(\"invalid configuration value for 'UPDATE_PERIOD' ('{}')\", get_str(&raw, \"UPDATE_PERIOD\")),\n        };\n\n        let user_whitelist = {\n            let v = get_str(&raw, \"USER_WHITELIST\");\n            if v.is_empty() {\n                None\n            } else if v.contains(',') {\n                crate::cprintln!(\"[x] configuration value 'USER_WHITELIST' has been changed. Please use it to set location of whitelist file\");\n                None\n            } else {\n                let p = normalize_path(&root, &v);\n                if !p.is_file() {\n                    bail!(\"missing 'USER_WHITELIST' file '{}'\", p.display());\n                }\n                Some(p)\n            }\n        };\n        let user_ignorelist = {","sourceCodeStart":783,"sourceCodeEnd":819,"githubUrl":"https://github.com/stamparm/maltrail/blob/77cfb06d7606506d101bbcec0786c77166c4255e/sensor/src/config.rs#L783-L819","documentation":"UPDATE_PERIOD must parse as an unsigned 64-bit integer via get_u64. When it is absent or not a valid u64, the match falls to None and the loader bails, interpolating the raw string value that failed to parse.","triggerScenarios":"Setting UPDATE_PERIOD to a non-numeric string (e.g. \"30s\", \"1h\"), a negative number, or a value with units/suffixes that get_u64 cannot parse; also an empty UPDATE_PERIOD= line.","commonSituations":"Admins writing duration strings like '5m' because other tools accept them; copying a value with a trailing space or comment; deleting the numeric part while editing, or using a float like 1.5.","solutions":["Set UPDATE_PERIOD to a bare integer number of the expected unit, e.g. UPDATE_PERIOD=30.","Convert duration strings to plain integers (5m -> 300, 1h -> 3600).","Remove quotes, whitespace, units, or inline comments from the value.","Check the sensor docs for which time unit the integer denotes."],"exampleFix":"// before (config.conf)\nUPDATE_PERIOD=30s\n\n// after (config.conf)\nUPDATE_PERIOD=30","handlingStrategy":"validation","validationCode":"let v = get_str(&raw, \"UPDATE_PERIOD\");\nif v.parse::<u64>().is_err() {\n    eprintln!(\"UPDATE_PERIOD must be a plain integer, got '{v}'\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use bare integers, never '30s'/'5m' style durations.","No quotes, whitespace, units, or inline comments in the value.","Convert durations explicitly when translating from other tools' configs."],"tags":["rust","configuration","parsing"],"backgroundTag":"invalid-config-value","analyzedSha":"77cfb06d7606506d101bbcec0786c77166c4255e","analyzedAt":"2026-09-13T03:50:16.010Z","contentChangedAt":"2026-09-13T03:50:16.010Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}