Changing pfSense hostname and logging



  • pfSense version: 2.2.4-RELEASE

    I initially set my pfSense hostname to 'smoke' in the initial installation wizard.  The logging prepended log entries with the hostname, such as:
    smoke unbound: [57735:0] notice: init module 1: iterator

    I then changed the hostname to 'fire' in System: General Setup, and the logging no longer includes the hostname.  I now just get:
    unbound: [27596:0] notice: init module 1: iterator

    Not that it is performance-impacting, I just find it curious that the logging loses the hostname.


  • Banned

    Have you considered rebooting the box?



  • I have rebooted the box a couple of times.  No change.



  • Where are you looking? The log pages in the web interface trim out the hostname as it's not really useful when you're logged into that specific box. If you dump the raw logs with clog, or syslog to a remote host, you'll see the hostname.



  • I am viewing the logs via the web GUI.  I see the entries with the old hostname as well as the entries without the new hostname.

    Here you can see when I made the hostname change and rebooted the box.  This is copied and pasted out of the GUI log viewer.

    From Resolver Log:

    
    Nov 3 07:36:45	smoke unbound: [69603:0] notice: init module 0: validator
    Nov 3 07:36:45	smoke unbound: [69603:0] notice: init module 1: iterator
    Nov 3 07:36:46	smoke unbound: [69603:0] info: start of service (unbound 1.5.3).
    Nov 3 07:42:07	unbound: [27596:0] notice: init module 0: validator
    Nov 3 07:42:07	unbound: [27596:0] notice: init module 1: iterator
    Nov 3 07:42:07	unbound: [27596:0] info: start of service (unbound 1.5.3).
    
    

    From Gateways Log:

    
    Nov 2 11:38:50	smoke apinger: SIGHUP received, reloading configuration.
    Nov 2 11:49:28	smoke apinger: Starting Alarm Pinger, apinger(18919)
    Nov 3 07:41:55	apinger: Starting Alarm Pinger, apinger(19398)
    Nov 3 07:42:04	apinger: SIGHUP received, reloading configuration.
    
    

    EDIT: unless its not trimming the old hostname because it only trims out the current hostname.  I am almost certain I was seeing 'smoke' before I made the hostname change though.  This box is a temporary firewall, which I built to take over for my 2.1.4 APU while I upgrade it.  It was bothering me to see the wrong hostname in the logs, so I changed it to the same hostname as the APU.  That is when I saw the hostname disappear from the logs (via webgui).

    Like I say, this is not affecting performance.  It's really only aesthetics.  I just find it interesting.



  • It's not removing the old hostname from the old logs, that only applies to the current hostname. It never shows the current hostname there.


Log in to reply