ytti/oxidized · error · RuntimeError

<pfsense> missing in config file!

Error message

<pfsense> missing in config file!

What it means

Error "<pfsense> missing in config file!" thrown in ytti/oxidized.

Source

Thrown at lib/oxidized/model/pfsense.rb:14

class PfSense < Oxidized::Model
  using Refinements

  # use other use than 'admin' user, 'admin' user cannot get ssh/exec. See issue #535

  cmd :secret do |cfg|
    cfg.gsub! /(\s+<bcrypt-hash>).+?(<\/bcrypt-hash>)/, '\\1[secret hidden]\\2'
    cfg.gsub! /(\s+<password>).+?(<\/password>)/, '\\1[secret hidden]\\2'
    cfg.gsub! /(\s+<lighttpd_ls_password>).+?(<\/lighttpd_ls_password>)/, '\\1[secret hidden]\\2'
    cfg
  end

  cmd 'cat /cf/conf/config.xml' do |cfg|
    raise "<pfsense> missing in config file!" unless cfg.include? "<pfsense>"

    cfg.gsub! /\s<revision>\s*<time>\d*<\/time>\s*.*\s*.*\s*<\/revision>/, ''
    cfg.gsub! /\s<last_rule_upd_time>\d*<\/last_rule_upd_time>/, ''
    cfg.gsub! /\s<created>\s*<time>\d*<\/time>\s*.*CDATA\[Auto\].*\s*.*\s*<\/created>/, ''
    cfg
  end

  # The comment output has to be at the end since and XML file may not start
  # with a comment.

  cmd 'cat /etc/version' do |version|
    xmlcomment "PFsense #{version}"
  end

  metadata :bottom do
    xmlcomment interpolate_string(
      vars("metadata_bottom") ||
      vars("metadata_top") ||

View on GitHub (pinned to 687ed4262d)

When it happens

Trigger: Thrown at lib/oxidized/model/pfsense.rb:14 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ytti/oxidized@687ed4262d (2026-08-23). Data as JSON: /api/errors/d96f9303bab9a7e9. Report an issue: GitHub.