In which use cases do we have to use these extensions in dynatrace, 1. Generic Network Device, 2. SNMP Traps.
What are the specific use cases for each of them ?
The first extension uses the SNMP protocol to extend the already existing network monitoring in DT.
The second plugin is used to capture SNMP Trap, which you can configure on your network devices.
SNMP Trap/Inform - asynchronous notification sent by an agent when a significant event occurs (e.g. failed login attempt, port shutdown)
In general, it all depends on what you want/need to achieve in network monitoring.
Dynatrace natively does not have the ability to monitor network devices. Using SNMP Trap, for example, can give you information via such a trap if an alert is generated.
You can also use the built-in APIs in your network devices or firewall to use a simple script (e.g. Python) to extract the metrics you are interested in and use Metrics Ingest to put them into Dynatrace. You then create Metric Events based on these. Remember, however, that this consumes DDU licences.
In summary if you have the option then add SNMP Trap, but also consider using the API.
Okay, so Generic Network Device extension will provide a wide variety of metrics (extend the networking metrics) and SNMP Traps are for alerting if any anomaly is occurred.
We have requirement to monitor Fortigate firewall, since we cant install one agent on it thus we will have to use at least use Generic Network Device extension, right ?
I believe you can use the Fortinet dedicated extension mentioned below in case you need to monitor Fortigate firewall (REST API). otherwise, you can use the generic Network Device extension to monitor network devices with SNMP traps.