
The FortiGate needs to be running FortiOS 7.0 and above to be able to use this API.
The script that I used: ================= import requests from tokens import fw_token import json from datetime import date, datetime import socket def get_bw(): url = "https://firewall_ip/api/v2/monitor/system/traffic-history/interface?interface=interface_name&time_period=hour" requests.packages.urllib3.disable_warnings() payload={} headers = {'Authorization': f'Bearer {fw_token}'} response = requests.request("GET", url, headers=headers, data=payload, verify=False).json() return response data = get_bw() #print(data) last_tx = data["results"]["last_tx"] last_rx = data["results"]["last_rx"] ts = datetime.timestamp(datetime.now()) current_bw = {"last_tx": last_tx, "last_rx": last_rx, "time": int(ts)} Convert the data to binary data_to_send = json.dumps(current_bw).encode('utf-8') Create a socket object and use the sendto method to send the data s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto(data_to_send, ('logstash_ip', udp_port))
This course is Elastic Stack 8.x, including Elasticsearch, Kibana, Logstash, Beats, ILM, and Fleet Server.
Master the Elastic Stack: Elasticsearch & Kibana Hands-On is a complete, practical course designed for anyone who wants to learn how to install, configure, secure, ingest, monitor, visualize, and manage the Elastic Stack from scratch. Whether you are a beginner or an IT professional, this course covers all aspects of real-world data pipelines, monitoring, and analytics.
Why Learn Elastic Stack?
Power Modern Data Workflows – Ingest, enrich, and monitor logs from multiple sources like FortiGate firewalls, Cisco ASA, SNMP devices, and system logs.
Unlock Career Opportunities – Gain skills required for high-demand roles in DevOps, Security Operations, SIEM, Monitoring, and Analytics.
Build Enterprise-Level Solutions – Learn to manage clusters, implement Index Lifecycle Management (ILM), and scale Elasticsearch deployments efficiently.
Visualize & Analyze Data – Use Kibana dashboards, Lens, Timelion, and visualizations to turn raw logs into actionable insights.
What You Will Learn
By the end of this course, you will be able to:
Install, configure, and secure a complete Elastic Stack including Elasticsearch, Kibana, Logstash, Beats, and Fleet Server.
Ingest data from multiple sources using Logstash, Filebeat, Packetbeat, and Metricbeat.
Monitor Elastic Stack components, clusters, and logs using Metricbeat & Filebeat.
Visualize and analyze logs in Kibana, create dashboards, and use Timelion for advanced graphs.
Implement Index Lifecycle Management (ILM) and perform rolling restarts to ensure cluster stability.
Build automated alerting systems using Logstash Email Output Plugin and ElastAlert2.
Deploy Elastic Stack using Docker and build custom Logstash Docker images.
Work with real-world log sources such as FortiGate, Cisco ASA, SNMP, and Bandwidth statistics.
Kibana Advanced Visualizations Explained
Elasticsearch: Collect Logs Using Filebeat
Kibana: DataView and Dashboards
Elasticsearch: Mappings & Bulk Upload
Elasticsearch: Install on Docker
Elasticsearch: Complete Search with Query DSL
Elasticsearch: Collect Metrics with Metricbeat
Hands-On Projects
You will gain practical experience through hands-on exercises covering:
Complete Elastic Stack setup and security configuration
Log ingestion pipelines from firewalls and network devices
Cluster monitoring, node addition, and scaling
Creating Kibana dashboards and Timelion graphs
Setting up automated alerts and notifications
Docker-based Elastic Stack deployment
By the end of this course, you will be confident in designing, deploying, and managing enterprise-grade Elastic Stack solutions for real-world applications.
Start Your Elastic Stack Journey Today!
Gain hands-on skills, boost your career, and become proficient in Elasticsearch, Kibana, Logstash, and Beats. This course equips you to handle logging, monitoring, analytics, and visualization like a professional.