Closed hvdhelm closed 4 months ago
Please try pfsense_zbx.php with latest commit on develop. Will need other possible status descriptions in order to map correct values.
Results with the pfsense_zbx.php on the develop branch, same result. I double checked if the php-file was updated.
[22.05-RELEASE][admin@dev]/root: zabbix_get -s 127.0.0.1 -p 10050 -k "pfsense.value[openvpn_clientvalue,1,status]"
0
[22.05-RELEASE][admin@dev]/root:
Found the solution! Your code placed in the right mapping section. ;)
// Value mappings
// Each value map is represented by an associative array
function pfz_valuemap($valuename, $value, $default="0"){
switch ($valuename){
case "openvpn.server.status":
$valuemap = array(
"down" => "0",
"up" => "1",
"connected (success)" => "1",
"none" => "2",
"reconnecting; ping-restart" => "3",
"waiting" => "4",
"server_user_listening" => "5");
break;
case "openvpn.client.status":
$valuemap = array(
"up" => "1",
"connected (success)" => "1",
"down" => "0",
"none" => "0",
"reconnecting; ping-restart" => "2");
break;
Notice the case "openvpn.client.status":
section.
[22.05-RELEASE][admin@dev]/root: zabbix_get -s 127.0.0.1 -p 10050 -k "pfsense.value[openvpn_clientvalue,1,status]"
1
[22.05-RELEASE][admin@dev]/root:
Now we have the right 1
value.
Hello, could you please specify what changes in value mapping helped exactly? I have tried manually adding this mapping into template, but tunnels that are up are still reported as down(their real status is Connected (Success)).
After upgrading my nodes to pfSense 22.05 the 'OpenVPN Client xyz UDP4 Tunnel Status' status value's changed. In earlier versions is was a simple value 'up' mapped in the php script with
pfz_valuemap / openvpn.client.status
to value 1. This will not work anymore in feature versions.Old value: up New value: Connected (Success)
Zabbix Agent: 5.0.11
Output BEFORE upgrade (pfSense Plus 21.0.5.1)
Output AFTER upgrade (pfSense Plus 22.05)