I want to see somehow a spot where a Fortinet Fortigate cluster shows it’s other node with a serial and hostname.
The inventory shows only the active member. The State sensors, nicely shows the state (in sync or not) and there it does sees the other node’s hostname.
Particular, it would be very nice if the data is present in one of the API-calls.
We have made a quick fix what works for us. We make use of the ‘features’ field so we can easily do a API-call and get all the serials from the fortigates. This helps with comparing the licenses (Flex or old-style) we have with Fortinet. It does happen that licences matched with a serial are still being paid but no active device (serial ) is on the network anymore.
Our “fix”:
index 1b1fe5fa5..9d738c884 100644
--- a/LibreNMS/OS/Fortigate.php
+++ b/LibreNMS/OS/Fortigate.php
@@ -46,6 +46,11 @@ class Fortigate extends Fortinet implements
parent::discoverOS($device); // yaml
$device->hardware = $device->hardware ?: $this->getHardwareName();
+ $ha_serials = snmp_walk($this->getDeviceArray(), '.1.3.6.1.4.1.12356.101.13.2.1.1.2', '-Ovq');
+ $ha_hostnames = snmp_walk($this->getDeviceArray(), '.1.3.6.1.4.1.12356.101.13.2.1.1.11', '-Ovq');
+ if ($ha_serials) {
+ $device->features = "$ha_serials,$ha_hostnames";
+ }
}
The downside is; this could break the daily/monthly update or as I recall how the update process works: it removes our version so we do this also with a cronjob:
* * * * * cp /opt/Fortigate.php /opt/librenms/LibreNMS/OS/Fortigate.php
But this is far from elegant.
If the HA details can be expanded somehow, somewhere backed with an API-call, that would be a warm welcome.