Closed ScooterNC closed 3 years ago
Please check issue #26.
I did check that issue before opening this one. Why did you close this?
Why did you close this?
Sorry, pushed close and comment instead of Comment.
Please double-check the configuration and post details (screenshots, log, cli results) if you're seeking help.
No worries. I have doubled check everything and it follows the instructions. I will get you the screenshots and captures
Here are the screenshots. The FreeBSD one shows connection is good so it is something else
Have you tried to run the php script via pfsense cli? Does it execute without errors?
I get permission denied. Any ideas? I am logged in as admin
I had to change the permissions of the file and now I get: ./pfsense_zbx.php: cannot open ?php: No such file or directory ./pfsense_zbx.php: /COPYRIGHT: Permission denied ./pfsense_zbx.php: pfsense_zbx.php: not found ./pfsense_zbx.php: Version: not found ./pfsense_zbx.php: 6: Syntax error: newline unexpected (expecting word)
You need to login as root via ssh or in console.
I am logged in as root, same issue.
./pfsense_zbx.php: cannot open ?php: No such file or directory ./pfsense_zbx.php: /COPYRIGHT: Permission denied ./pfsense_zbx.php: pfsense_zbx.php: not found ./pfsense_zbx.php: Version: not found ./pfsense_zbx.php: 6: Syntax error: newline unexpected (expecting word)
try:
/usr/local/bin/php ./pfsense_zbx.php
I would ask that once we figure this out if we can delete the posts with my info in it that would be great
It seems is quite ok. Did you put the script in /root/scripts directory? If the script is in another directory you have to adjust the settings in zabbix agent configuration.
Check the zabbix agent logs also.
it is there:
[2.4.5-RELEASE][root@firewall.kreitler.us]/root/scripts: ls pfsense_zbx.php [2.4.5-RELEASE][root@firewall.kreitler.us]/root/scripts: pwd /root/scripts
how do I check the agent logs?
They are usually located in /var/log/zabbix_agentd.log Maybe in pfsense they are located in a different path
Here are the logs. 25500:20200911:094154.244 Starting Zabbix Agent [firewall.kreitler.us]. Zabbix 5.0.1 (revision c2a0b03480). 25500:20200911:094154.244 Enabled features 25500:20200911:094154.244 IPv6 support: YES 25500:20200911:094154.244 TLS support: YES 25500:20200911:094154.244 ** 25500:20200911:094154.244 using configuration file: /usr/local/etc/zabbix44/zabbix_agentd.conf 25500:20200911:094154.244 agent #0 started [main process] 25879:20200911:094154.244 agent #1 started [collector] 26105:20200911:094154.245 agent #2 started [listener #1] 26172:20200911:094154.245 agent #3 started [listener #2] 26242:20200911:094154.245 agent #4 started [listener #3] 25500:20200911:163813.339 Got signal [signal:15(SIGTERM),sender_pid:46040,sender_uid:0,reason:65537]. Exiting ... 25500:20200911:163813.341 Zabbix Agent stopped. Zabbix 5.0.1 (revision c2a0b03480). 47123:20200911:163818.414 Starting Zabbix Agent [firewall.kreitler.us]. Zabbix 5.0.1 (revision c2a0b03480). 47123:20200911:163818.415 Enabled features 47123:20200911:163818.415 IPv6 support: YES 47123:20200911:163818.415 TLS support: YES 47123:20200911:163818.415 ** 47123:20200911:163818.415 using configuration file: /usr/local/etc/zabbix44/zabbix_agentd.conf 47123:20200911:163818.415 agent #0 started [main process] 47388:20200911:163818.415 agent #1 started [collector] 47698:20200911:163818.415 agent #2 started [listener #1] 47729:20200911:163818.416 agent #3 started [listener #2] 48038:20200911:163818.416 agent #4 started [listener #3] 47123:20200911:163959.844 Got signal [signal:15(SIGTERM),sender_pid:3838,sender_uid:0,reason:65537]. Exiting ... 48038:20200911:163959.844 failed to accept an incoming connection: select() failed: [4] Interrupted system call 47123:20200911:163959.845 Zabbix Agent stopped. Zabbix 5.0.1 (revision c2a0b03480).
Looks like when I update the config for the agent it stops and restarts so this log isn't very useful
I changed the template to FreeBSD and it went green and that log didn't show anything
One thing I did notice is that the FreeBSD template reference Template Module Zabbix agent. So I have added that template too and will let you know if anything changes
In my setups I've never linked other templates besides this. Please note this is an active template and some requirements must be met in order to perform active checks. I suggest you to try to reconfigure everything from scratch
so I tried that to no avail. I looked at the agent config and it doesnt have any of the user parameters. Shouldnt this file have them?
I uninstalled 5 and installed 4.4 and it shows in the config file now. I will let you know if it starts working.
Nope it shows red for ZBX. Any other ideas? Don’t know if this makes a difference but this is a VM on ESXi
You can close this. Disappointing I cant use it but oh well.
You can close this. Disappointing I cant use it but oh well.
I'm sorry but looking to your configuration page in pfsense seems you didn't filled the "Server Active" field, which has to match the zabbix server name defined in zabbix configuration.
See https://www.zabbix.com/documentation/current/manual/appendix/items/activepassive
That worked. I wasnt aware that I had to do that. I am not very well versed in Zabbix but I really appreciate your help.
I have followed your instructions and used the Zabbix Agent 5.0 on PFSense. I cannot get it to work. If I use the FreeBSD, it connects.