Git Product home page Git Product logo

upgrade_fgt's Introduction

Update API FGT BNP

The program is for upgrading automatically Fortigates via a Fortimanager. It runs first pre-checks on the Fortigates to verify their health. If one is not responding well, then the upgrade won't happen on it. The upgrade task is done in a single task including all the Fortigates targeted. It follows an upgrade path predifined by the Fortimanager. Once it is done, the program post-cheks the Fortigates to catch the upgrade errors and if there are some a retry is proposed on the Fortigates concerned.

PREREQUISITES

Install the following python libraries:

pip install pyfmg
pip install pysnmp

The Fortigates must be able to ping the FortiManager. The computer from where you launch the program has to request via SNMP the fortigates. It gets the ips registered on the Fortimanager. You must be able to connect to Fortigates via these ips.

INITIALIZATION

All the inputs are the .ini file:

GENERAL

  • All the logs are saved in a file (log_file) and the verbosity of the console and the file can be changed.
  • nb_thread gives details about the max number of parallel upgrades you authorize. The more it is big the more CPU will be consumed on the Fortimanager.
  • target_version is the final version of the fortigate.
  • automatic is a boolean. If False, if an upgrade fails or a connection error happens, then the user will be able to retry the upgrade or reconnect. If it is to True, on a failed upgrade the program won't retry the upgrade on the Fortigate. On a connection error it will try infinitely to reconnect.

ADOM

  • Place the list of adoms you want to upgrade

FORTIANALYZER

  • User, and password needs to be API user.
  • event_severity is the level of unacceptable events for an upgrade. These events are not the logs but manually configured events on the FAZ triggered when the action targeted is logged from the FGT.

OID

  • We get the session count, rate, the cpu and memery usage and the interfaces Status. All these checks are made on the global system execpt "ifOperStatus" made at the interface level.

OID_LIMIT

  • Treshold to validate the snmp checks. For session count and rate, this treshold is a minimum to validate the goo health of the Fortigate.
  • Limits for CPU and MEMORY usage are maximum usage we can accept.

upgrade_fgt's People

Contributors

cprevot93 avatar

Watchers

 avatar

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.