In your case, the hostname shown in the alert corresponds to the Wazuh manager’s hostname. Are you referring to the hostname field as the agent.name in the alert?
If so, this is expected behavior when sending logs to the Wazuh manager via syslog.
Unfortunately, add a static field in the log or change its hostname using a decoder or rule is not possible right now.
However, you can try a different approach — by adding a static field to the logs before they are analyzed by the Wazuh manager.
You can refer to a similar discussion on the Wazuh Slack community channel, where this method and its steps are explained.
If you would like to configure it in that way, please share the following details so we can analyze and guide you more accurately:
The raw log from pfSense
The corresponding alerts.json entry from the Wazuh dashboard related to this alert
Any custom decoders or rules you may have created
Additionally, you can check the location field in the alert — it indicates the source from which the syslog was received.
I’ve attached a screenshot of one of my test syslog alerts for your reference.
I understand your point. Based on the shared log and decoder, I have replicated the scenario on my end.
If you want to change the location field value to your pfSense IP (instead of your rsyslog server IP), you can achieve this by following the steps below.
After applying the configuration, trigger a new event and check the location field in the Wazuh dashboard for the new alert.
It should now display your pfSense domain (or IP) instead of the rsyslog server’s IP.
I’ve tested this configuration on my setup, and it’s working correctly.
Below are the results from my environment for reference:
Before configuration: location = 192.168.0.16
After configuration: location = pfsense.domain