icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Fortinet FortiGate App for Splunk
SHA256 checksum (fortinet-fortigate-app-for-splunk_163.tgz) a8dd65a74deb70d55b93bf824cf4aa7e6e7f1787d8599942c9b81484f2933133 SHA256 checksum (fortinet-fortigate-app-for-splunk_162.tgz) 30b50704f3162182a000966804ce16fe912aec531e6765f30b14b0deb886bf18 SHA256 checksum (fortinet-fortigate-app-for-splunk_161.tgz) aa30011ad9653db68aa4e038efdd72adfd18761c36fa2844e54c2f8e005180cc SHA256 checksum (fortinet-fortigate-app-for-splunk_160.tgz) d858f4e82f3bf48c778272f58d71faccccd1fc2f34a890dede5373b8ca7ca2b9 SHA256 checksum (fortinet-fortigate-app-for-splunk_151.tgz) 2c64990bce6b3bc98e5b7d4db31a53563086f5bb2b55b6926ff5e51ba4454af3 SHA256 checksum (fortinet-fortigate-app-for-splunk_150.tgz) d3a744d24c447faf06c590ecf9f1b7df574373477af93203beb0fada092f4788 SHA256 checksum (fortinet-fortigate-app-for-splunk_14.tgz) fdaf37686b45e860489527257af7325f3a91d2f4c67b1e18ec076a6dd55abe5e SHA256 checksum (fortinet-fortigate-app-for-splunk_13.tgz) b8c844ae9acd3b987ea9dce4a1d1fb9da3935c2eb33465eda674f1e9952fbef3 SHA256 checksum (fortinet-fortigate-app-for-splunk_12.tgz) ce59144c78e12a1195c76ffb4670249399fa24694da7eb09bfeeb9c6b884da28 SHA256 checksum (fortinet-fortigate-app-for-splunk_11.tgz) 131ec835b50997d23ecac40d87000dc8aeb832e7b4a49544809416ee1fda36d7 SHA256 checksum (fortinet-fortigate-app-for-splunk_10.tgz) e0a6ca30592c32aea376d99d3209bb33955e9474a6f74151ead5e7b5416c25b8
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

Fortinet FortiGate App for Splunk

This app has been archived. Learn more about app archiving.
This app is NOT supported by Splunk. Please read about what that means for you here.
Overview
Details
The Fortinet FortiGate App for Splunk provides datacenter threat visualizations to identify anomalous behavior and helps de-duplicate threat feed data to enable the fast creation and consolidation of analytics. The Fortinet FortiGate App for Splunk properly maps log fields from FortiGate appliances and interchanges into a common format to Splunk intelligence framework.
The Fortinet FortiGate App for Splunk verifies current and historical logs, administrative events, basic firewall, unified treat management, anti-virus, IPS and application controls with Fortinet VDOM enabled. The integrated dashboard enables layered defense with network security, better application threat detection and management through rich data logs from Fortinet physical and virtual appliances.

The Fortinet FortiGate App for Splunk supports logs from FortiOS 5.0/5.2/5.4. FortiOS 5.6 and later are supported beginning from Fortinet FortiGate Add-on for Splunk 1.5 version.

Fortinet FortiGate App for Splunk

Next Generation and Datacenter Firewalls

Overview

The Fortinet FortiGate App for Splunk provides real-time and historical dashboard and analytical reports on traffic, threats, wireless APs, systems, authentications and VPNs for all products across the FortiGate physical and virtual appliances. The integrated solution pinpoints threats and attacks with faster response times without long exposure in unknown troubleshooting state.

With the massive set of logs and big data aggregation through Splunk, the Fortinet FortiGate App for Splunk is certified with pre-defined threat monitoring and performance indicators that guide network security practices a lot easier in the datacenter. As the de facto trending dashboard for many enterprises or service providers, IT administrators can also modify the regular expression query to custom fit for advanced security reporting and compliance mandates.

This document describes how to set up Fortinet FortiGate App for Splunk as well as configuration on the appliances to enable log shipping to Splunk.

Dependencies

The Fortinet FortiGate App depends on the Add-on in order to work properly, so please make sure Fortinet FortiGate Add-on for Splunk has been installed before you proceed.

Also, please check whether FortiGate FOS is 5.0 version or later. The app beginning from 1.6.0 version will depend on the Add-on's 1.6.3 version and up.

Configuration Steps

1. Install Fortinet FortiGate Add-on for Splunk on search head, indexer, forwarder or single instance Splunk server:

Note: There is a 3rd party add-on for Fortinet named Fortinet Fortigate with FortiOS 5 Add-On with folder name TA-fortinet, which has conflict with Fortinet FortiGate Add-on for Splunk, so you need to disable the 3rd party add-on before you proceed.

There are three ways to install the add-on:

  1. Install from Splunk web UI: Manage Apps->Browse more apps->Search keyword “Fortinet” and find the add-on with Fortinet logo->Click “Install free” button->Click restart splunk service.
  2. Install from file on Splunk web UI: Manage Apps->Install from file->Upload the .tgz file which is downloaded from https://splunkbase.splunk.com/apps ->check the upgrade box-> click restart splunk service.
  3. Install from file on Splunk server CLI interface: Extract the .tgz file->Place the TA-fortinet folder under $SPLUNK_HOME/etc/apps-> Restart Splunk service.

2. Install Fortinet FortiGate App for Splunk on search head or single instance Splunk server:

There are three ways to install the app:

  1. Install from Splunk web UI: Manage Apps > Browse more apps > Search keyword “Fortinet” > Click “Install free” button > Click Restart Splunk Service.
  2. Install from file on Splunk web UI: Manage Apps > Install from file > Upload the .tgz file which is downloaded from https://splunkbase.splunk.com/app > Click Restart Splunk service.
  3. Install from file on Splunk server CLI interface: Extract the .tgz file->Place the SplunkAppForFortinet folder under $SPLUNK_HOME/etc/apps > Restart Splunk Service.

3. Add data input on Splunk server:

Note: From version 1.2, the Splunk TA(Add-on) for fortigate no longer match wildcard source or sourcetype to extract fortigate log data, a default sourcetype fortigate_log(before 1.6, the default is fgt_log) is specified in default/props.conf instead, please follow the instruction below to configure your input and props.conf for the App and TA(Add-on).

Through Splunk Web UI:
Option1: Adding a TCP/UDP input
Settings->Data Input->UDP
Port: 514 (Example, can be modified according to your own plan)
Sourcetype: fortigate_log (Example, can be modified according to your own plan but need to match the sourcetype stanza in props.conf)

Option2: Adding a file input
Settings->Data Input->Files & Directories
Browse: Select the file directory
Select sourcetype: if fortigate_log is not created yet, click Save As -> Name:fortigate_log
Leave others unchanged and save.

Note: the UDP port, 514 in this example should be opened in firewall for logs to pass through. If you choose TCP input and on FortiGate use "reliable"(tcp) mode for syslog setting, you will need to add the following in local/props.conf because tcp tranported syslog will have xxx <yyy> header as line indicator.(8514 below is an example of TCP port, you can choose your own. There is no timestamp header like UDP so you can specify the timestamp field in the fortigate log, in our case the precision is in nanoseconds so the time format is %s%9N. If your FOS version has time stamp in different precision, refer to: https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/Commontimeformatvariables)

[source::tcp:8514]
SHOULD_LINEMERGE = false
LINE_BREAKER = (\d{2,3}\s+<\d{2,3}>)
TIME_PREFIX = eventtime=
TIME_FORMAT = %s%9N

Fortinet FortiGate Add-On for Splunk will by default automatically extract FortiGate log data from inputs with sourcetype 'fortigate_log'.
If you want to configure it to extract a self-defined sourcetype, copy the props.conf
in $SPLUNK_HOME/etc/apps/Splunk_TA_fortinet_fortigate/default/props.conf to
$SPLUNK_HOME/etc/apps/Splunk_TA_fortinet_fortigate/local/props.conf and change the source stanza.
replace [fortigate_log] with [fortigate], for instance.

Note: Please use notepad++ to edit the configuration files if you are working on a Windows operating system. Windows's default Notepad can not display or save the configuration file in proper format.

If a customized index is used for the input, it also needs to be added in admin user's default authorized list of indexes to search.
In $SPLUNK_HOME/etc/system/local/authorize.conf

[role_admin]
srchIndexesDefault = fortigate;main
srchMaxTime = 8640000

In this example, fortigate is the index for my fortigate log input.

Restart Splunk service for the change to take effect.

4. Configure FortiGate to send logs to Splunk server:

config log syslogd setting (or 'config log syslogd2/3' setting if syslogd is occupied)   
set status enable   
set server "x.x.x.x"   
set port 514 (Example. Should be the same as in data input of Splunk server)   
end

Note: If you are forwarding FortiGate logs from Fortianalyzer, please make sure you set the format to syslog instead of the default CEF format. If you would like to use TCP as transport protocol, please add 'set mode reliable' and refer to step3 above for TCP related configuration on Splunk side.

5. Enable Data Model Acceleration:

Since version 1.5.0 of the app, data model acceleration is no longer enabled in default/datamodels.conf. User has to either enable data acceleration on Splunk GUI Settings->Data Models->Fortinet FoS Log.
Or on Splunk search head, where the app is installed, create "local" folder under $SPLUNK_HOME/etc/apps/SplunkAppForFortinet/ and create a file in this "local" folder named datamodels.conf with the following content:

[ftnt_fos]
acceleration = 1
acceleration.earliest_time = -1mon

6. Verify that logs are received on Splunk server:

Alt text

At this point, you will see data parsed and presented on Fortinet Network Security dashboard.

Alt text

Fortinet FortiGate App for Splunk delivers the data visibility throughout Fortinet’s next-generation firewalls and the analysis for advanced security reporting without error prone manual process.


7. (Optional)Extract time from FOS log:

There is eventtime field with the epoch time in FortiGate log in newer FOS versions(6.0 and later). To use it as the timestamp, you can add the following in local/props.conf under the stanza of the corresponding input.
If the eventtime field has 19 digits(FOS6.4 and later)

TIME_FORMAT = %s%9N
TIME_PREFIX = eventtime=

If the eventtime field has 10 digits:

TIME_FORMAT = %s
TIME_PREFIX = eventtime=

In FOS5.6 version, the field is called logtime, so change TIME_PREFIX accordingly:

TIME_FORMAT = %s
TIME_PREFIX = logtime=

8. (Optional)Reduce Log Volume:

Splunk Enterprise sends unwanted incoming events to nullQueue to discard them during data routing and filtering. To set up this filter, you can add the following regex in local/props.conf of fortigate add-on Splunk_TA_fortinet_fortigate.
Example:

TRANSFORMS-force_sourcetype_fortigate = setnull,force_sourcetype_fortigate

Also add the following regex in local/transforms.conf of fortigate add-on Splunk_TA_fortinet_fortigate.

[setnull]
REGEX = <expression for the filter here> (Example: REGEX = policyid=57)
DEST_KEY = queue
FORMAT = nullQueue

Please restart Splunk service for the change to take effect.

9. (Optional)Using Syslog-NG to send FortiGate Logs to Splunk Cloud:

9a. Configure syslog-NG

1. Disable rsyslog: sudo dpkg –purge rsyslog
2. Install syslog-NG: apt install syslog-ng
3. Configure syslog-NG, add following content to /etc/syslog-ng/syslog-ng.conf

    @version:3.5
    # syslog-ng configuration file.
    source s_network {
    udp(port(5514));
    };

    #Destinations
    destination d_all { file("/var/log/fortigate/$HOST/$YEAR-$MONTH-$DAY-catch_all.log" create_dirs(yes)); };

    # Filters
    filter f_all {
    };

    # Log
    log { source(s_network); destination(d_all); };

4. Restart the syslog-NG service: service syslog-ng restart

9b. Configure the Fortinet devices to point their syslog to the syslog-NG

Add the following CLI to Fortigate to send syslog to syslog-NG

config log syslogd setting
set status enable
set server “<ip of syslog-NG server>”
set port 5514
end

9c. Configure the Splunk Universal Forward on the syslog-NG server

1. Install the Splunk Universal Forwarder
Refer to: https://docs.splunk.com/Documentation/Forwarder/8.2.2/Forwarder/HowtoforwarddatatoSplunkCloud?ref=hk#HowtoforwarddatatoSplunkCloud#How_to_forward_data_to_Splunk_Cloud
2. Configure the Splunk Universal Forwarder
Add data source to /opt/splunkforwarder/etc/search/local/input.conf

    [monitor:///var/log/fortigate/*/*.log]
    sourcetype = fortigate_log
    disabled = false

3. Install Fortinet FortiGate Add-on for Splunk in Splunk cloud.
Through Splunk cloud web UI:
Apps-> Find More Apps-> Search keyword ‘Fortinet’ and find the add-on with Fortinet logo -> Click “Install” button
4. Restart Splunk Service

Troubleshooting

  • Check whether FortiGate FOS is 5.0 version or later.
  • Go back to Configuration Steps to double check if every step has been followed.
  • Make sure port 514 in this case is opened on firewalls throughout the log's data path.
  • Double-check Splunk server and FortiGate devices are synchronized in time.
  • Make sure traffic logging is enabled in policies on FortiGate configuration, for example:
config firewall policy   
edit 1   
set logtraffic all   
end   
end
  • If you see graphs on first page - Fortinet Network Security but there is none on rest of the dashboards, you can try to extend the time range. If there is graph after increasing the time range, the probable cause is data model is not accelerated completely yet. You can verify this by looking at Settings > Data Model > Fortinet FoS Log. Expand. If the percentage is low, it means Splunk server is limited on resources. It may take some time for the data model acceleration to catch up.
  • Sometimes, the logs received by syslogd can be transformed and would not match the regex in the app, so no data will be shown on dashboards. Here are the regex in transforms.conf of fortigate add-on Splunk_TA_fortinet_fortigate.
REGEX = ^.+?devid=\"?F(?:G|W|\dK).+?(?:\s|\,|\,\s)type=\"?(traffic|utm|event|anomaly)

Make sure the log can match those regex. If not, you can also make slight change on the regex to fit the log.
Please note in FOS 5.6 version, the type field includes "", so in order for the fortigate logs to be recognized, please upgrade Fortinet FortiGate Add-on for Splunk to 1.5 version. * The App only supports logs from FOS 5.0 and higher versions. Older versions have different log format so you might probably encouter problems. * If still no luck getting the dashboards to show anything, please try searching for "host=x.x.x.x" where x.x.x.x is the IP or the hostname of the machine reporting the log, if there are any results with sourcetype=fortigate_traffic, fortigate_event or fortigate_utm, you just need a little bit of patience, if not, please take a screenshot and send it to the email below.

For more information on the App support, email splunk_app@fortinet.com for further support.

Release Notes

Version 1.6.3
Sept. 8, 2021

v1.6.3: Sept 2021
- fix session by action aggregation

Version 1.6.2
Aug. 26, 2021

-1.6.2 update xml version to support Splunk 8.2

Version 1.6.1
June 3, 2021

fix session number miscalculation issue caused by long session

Version 1.6.0
April 1, 2021

update references of fgt to fortigate

Version 1.5.1
Dec. 10, 2019
  • consider anomly as threat
Version 1.5.0
Aug. 2, 2019
  1. fix app inspection errors: remove datamodel acceleration from default. User has to enable it manually on GUI or config file.
Version 1.4
Oct. 17, 2016

v1.4: Oct 2016
- Optimize datamodel to make acceleration faster and size smaller
- add default earliest time 1 month for acceleration
- Remove deprecated tags to pass certification precheck

Version 1.3
May 24, 2016

Changes for certification, no bug fixes or feature change.

Version 1.2
April 6, 2016

v1.2: Feb 2016
- Changes for Splunk certification
Note: From version 1.2, the Splunk TA(Add-on) for fortigate no longer match wildcard source or sourcetype to extract fortigate log data, a default sourcetype fgt_log is specified in default/props.conf instead, please follow the instruction in documentation to configure your input and props.conf for the App and TA(Add-on).

Version 1.1
Aug. 20, 2015

v1.1: Aug 2015
- Change App Name to "Fortinet Fortigate App for Splunk"
- Move data input processing to "Fortinet Fortigate
Add-On for Splunk"
- Change datamodel and dashboard search strings to fit
the Add-On sourcetypes and fieldnames

Version 1.0
July 24, 2015

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.