Hello!
New LibreNMS and Oxidized user. We have a Fortigate and a Fortianalyzer that I’d really like to back up using Oxidized. The FGT is backing up fine, but the FAZ is doing this:
FAZ200F # get system status
Platform Type : FAZ200F
Platform Full Name : FortiAnalyzer-200F
Version : v7.0.3-build0254 220202 (GA)
Serial Number : ##***##
BIOS version : 05000003
System Part-Number : P20789-03
Hostname : ##***##
Max Number of Admin Domains : 25
Admin Domain Configuration : Enabled
FIPS Mode : Disabled
HA Mode : Stand Alone
Branch Point : 0254
Release Version Information : GA
Current Time : Thu May 12 13:17:09 EDT 2022
Daylight Time Saving : Yes
Time Zone : (GMT-5:00) Eastern Time (US & Canada).
x86-64 Applications : Yes
Disk Usage : ##***##
File System : Ext4
FortiRecorder Cameras : ##***##
FaceRecognition Cameras : ##***##
FAZ200F # get system ha status
command parse error before 'status'
FAZ200F # get hardware status
command parse error before 'hardware'
FAZ200F # show full-configuration | grep .
command parse error before 'full-configuration'
FAZ200F # exit
So I did some digging, and I found HAT’s Blog which had a code snippet called fortiman.rb (it’s on the link). So I created the fortiman.rb file. I put it in ~oxidized/.config/oxidized/model/ and I changed the router.db to be:
faz-IP-address:fortiman:fortinet
In the config file, I have:
---
username: ##***##
password: ##***##
model: fortios
resolve_dns: true
interval: 3600
use_syslog: false
#debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars: {}
groups:
fortinet:
username: ##***##
password: ##***##
models: {}
pid: "/home/oxidized/.config/oxidized/pid"
crash:
directory: "/home/oxidized/.config/oxidized/crashes"
hostnames: false
stats:
history_size: 10
input:
default: ssh, telnet
debug: true
ssh:
secure: false
ftp:
passive: true
utf8_encoded: true
output:
default: git
git:
user: oxidized
email: ##***##
repo: "/home/oxidized/.config/oxidized/oxidized.git"
# default: file
# file:
# directory: "/home/oxidized/.config/oxidized/configs"
source:
default: csv
csv:
file: "/home/oxidized/.config/oxidized/router.db"
delimiter: !ruby/regexp /:/
map:
name: 0
model: 1
group: 2
username: 3
password: 4
# vars_map:
# enable: 5
model_map:
juniper: junos
cisco: ios
fortigate: fortios
faz: fortiman
source:
default: http
debug: false
http:
url: http://librenms.lioni.local/api/v0/oxidized
scheme: https
delimiter: !ruby/regexp /:/
map:
name: hostname
model: os
headers:
X-Auth-Token: ##***##
Not entirely sure what I’m doing wrong, but it doesn’t seem to be picking up the fortimon.rb file… the ownership is right (oxidized:oxidized) on all the files/etc in ~oxidized.
Oxidized v 0.28.0
Debian v11.3
Any help is greatly appreciated!
Thank you!
–Glenn