Code Monkey home page Code Monkey logo

zenpacks.community.fortinet's Introduction

Fortinet / Fortigate monitoring

Introduction

This is a Zenpack for Fortinet FortiGate firewalls. The existing Zenpack by Fabio Paracchini seems to be abandoned and use obsolete MIB's. This Zenpack is developed using zenpacklib.

Supported devices

I only had FortiGate models 100D and 3000D with OS version 5.x to test my zenpack. Feel free to try it with other models, and report if it works or break. I'm happy to assist you to get it working with other models.

models

  • 100D and 3000D (OS version 5.x) : confirmed by @cbueche.
  • Fortigate 800C : confirmed by @mattbze.

Features

  • serial number and firmware version in overview page
  • interface traffic
  • CPU load
  • memory load
  • disk usage
  • session count
  • IPS statistics
  • Sensors (voltage, temperature, fans, PSU)
  • Vdoms
  • Per Vdom :
    • interface traffic
    • CPU load
    • memory load
    • disk usage
    • session count and rate

Release notes

  • 23.12.2016 : 1.0.0 : initial version

Installation

Pre-requisites : Python packages

The installation of the required PyYAML should happen automatically. If not, use this :

easy_install PyYAML

Device class

  • create device class /Network/Firewall/Fortigate

Zenpack

  • install the Zenpack:
zenpack --install ZenPacks.community.Fortinet
zopectl restart; zenhub restart
  • a full zenoss restart is probably better.

set the Python class of the existing device

This is a one-time operation that is needed for devices that were present before the Zenpack installation (the devices added after installation get the correct Python class automatically). The symptom to decide if you need this: WARNING zen.ApplyDataMap: no relationship:XXX found on:YYY in zenhub.log.

Warning: this loops must be repeated until no device get moved anymore. Not sure why, maybe some glitch of Zenoss 4.x.

zendmd

for d in dmd.Devices.Network.Firewall.Fortigate.getSubDevicesGen():
    devname = d.getId()
    print('checking %s' % devname)
    if d.__class__.__name__ != 'FortigateDevice':
        dmd.Devices.Network.Firewall.Fortigate.moveDevices('/Network/Firewall/Fortigate', devname)
        commit()
        print('class of %s set to FortigateDevice' % devname)

Post-installation

MIB load

If you want to automatically map the device models and the SNMP traps, you need to load two MIB's:

cd MIB
cp FORTINET-*.mib $ZENHOME/share/mibs/site
cd $ZENHOME/share/mibs/site
zenmib run -v 10
zentrap restart

The go to Zenoss / advanced / MIBs. See if MIBs are available.

modeler plugins for /Network/Firewall/Fortinet

The plugins are automatically assigned during the Zenpack installation:

  • zenoss.snmp.NewDeviceMap
  • zenoss.snmp.DeviceMap
  • zenoss.snmp.InterfaceMap
  • zenoss.snmp.InterfaceAliasMap
  • zenoss.snmp.RouteMap
  • community.snmp.FortigateGlobal
  • community.snmp.FortigateSensor
  • community.snmp.FortigateVdom
  • community.snmp.FortigateIPS

Development notes

Using Vagrant in Virtualbox, use vagrant up to create and start a Zenoss to further develop this Zenpack. In the VM, /tmp/work is mapped to the Zenpack source, you can use these commands to install it:

zenpack --link --install ZenPacks.community.Fortinet
zopectl restart; zenhub restart

Known issues

In HA-mode, the zenoss.snmp.RouteMap modeler plugin produces these warnings in zenhub.log:

WARNING zen.IpInterface: Adding IP Address 10.1.2.3 to Index_47 found it on device 10.4.5.6

The reason for the warning is probably that both firewall instances see the same values and fight over who owns them. To avoid the issue, remove the zenoss.snmp.RouteMap modeler plugin from /Network/Firewall/Fortigate. The consequence is the loss of the Network Routes from the Components view.

To-do

  • automate the device class creation for /Network/Firewall/Fortigate
  • automate the installation of the MIBs
  • event clear from monitoring/performance template
  • disk usage alertings
  • add a screenshot with real-life data

Resources

zenpacks.community.fortinet's People

Contributors

cbueche avatar

Watchers

James Cloos avatar  avatar Matt Burley avatar

Forkers

mattbze

zenpacks.community.fortinet's Issues

Update for Fortianalysers

Hi Charles

I have added to this in our environment by adding in some Fortianalyser OIDS and graphs.

I would like to push this update back to you, however I am still newish to using Github. Would you prefer me to fork to initiate a pull request. I havent fixed an issue so to speak, just have a new MIB to add in with a new device class /Fortinet/Fortianalyser and templates for that new class.

KR
Matt

Using Fortigate Zenpack in Service Impact, components are auto-removing after a period of time.

Hi Charles

I think I may of found an issue when using this Zenpack with Service Impact element of Zenoss.

I created a network map and included the Fortigate firewall device and its components in a service node on a newly created Dynamic service model and found that after a few hours the components are automatically removed by Zenoss.

I have raised a ticket into their support and have been told the reason for this is because "multiple modeller plugins are bound to the same component". After checking this I found this was not the case but that the issue only does occur with Fortigates and this Zenpack.

I was hoping you might be able to try and replicate this.

Steps taken so far:

  • Deleted and rebuilt the Impact Service model and entering the Fortigate components.
  • Tried to only use a few of the network interface components rather than all issue still occurs.
  • Complete reboot of the Zenoss platform.
  • Tried on 2 different Zenoss platforms, our production and dev. Issue occurs across both.

.egg file?

Hi,

Forgive me if I am completely wrong on this, but shouldn't Zen Packs have .egg files for installation? I cannot see any for your release.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.