This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

HELP!!! Create a report via Universal Poller to get FortiGate License Information???

Is it possible to create a report via Universal Poller to get FortiGate License Information??? I'm not sure the right method for custom report. Maybe SQL/SWQL Query will work? 

  • The standard approach for this type of thing is to create a UnDP which extracts the information and then run a report against the UnDP.

    The problem you'll have is identifying the relevant OID from the Fortinet MIB. A quick Google suggests this OID: 1.3.6.1.4.1.12356.101.4.6.3.1.2 aka fgLicContractTable should provide the info - however none of the Forti's in our setup have this OID.

  • On your Orion server there is an SNMPWalk program that you can use to walk the MIB tree of the device. I usually do the MIB walk then search through the results to see if there is a match for the item and then if there is one create a custom poller for it. Give that a try. 

  • Hi, I have already create a undp to extract the information. Would you know the best way to create a report in Web console? SWQL or SQL perhaps? 

  • Hi, I have already create a undp to extract the information. Would you know the best way to create a report in Web console? SWQL or SQL perhaps? 

  • I used a SQL Query for mine and made a report out of it.

    You will need to fill in the information for your system where shown in all caps below. 

    Make sure you fill in YOURCUSTOMPOLLERNAME in both places and it needs to exactly match your UDP Poller name.

    The YOURFRIENDLYNAME can be anything you wish. 

    In the Where clause you can skip the "  Nodes.caption LIKE '%YOURDEVICECAPTION%' AND "  if you would like. I used it to match specific node names.

    SELECT 
    A.NodeName AS NodeName,
    A.IP_Address AS IP_Address,
    A.SysName AS SysName,
    A.Location AS Location,
    A.NodeID AS NodeID,
    
    MAX(CASE WHEN Poller_Name='YOURCUSTOMPOLLERNAME' THEN Status ELSE ''  END)  "YOURFRIENDLYNAME"
    
    
    FROM
    (
    
    SELECT 
    Nodes.Caption AS NodeName,
    Nodes.IP_Address AS IP_Address,
    Nodes.SysName AS SysName,
    Nodes.Location AS Location,
    CustomNodePollers_CustomPollers.UniqueName AS Poller_Name,
    CustomNodePollerStatus_CustomPollerStatus.Status AS Status,
    Nodes.NodeID AS NodeID
    
    FROM 
    ((Nodes INNER JOIN CustomPollerAssignment CustomNodePollerAssignment_CustomPollerAssignment ON (Nodes.NodeID = CustomNodePollerAssignment_CustomPollerAssignment.NodeID))  INNER JOIN CustomPollers CustomNodePollers_CustomPollers ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerID = CustomNodePollers_CustomPollers.CustomPollerID))  INNER JOIN CustomPollerStatus CustomNodePollerStatus_CustomPollerStatus ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerAssignmentID = CustomNodePollerStatus_CustomPollerStatus.CustomPollerAssignmentID)
    
    WHERE Nodes.caption LIKE '%YOURDEVICECAPTION%' AND
    (
      (CustomNodePollers_CustomPollers.UniqueName = 'YOURCUSTOMPOLLERNAME')
    )
    
    AND
    (
    (CustomNodePollerAssignment_CustomPollerAssignment.InterfaceID = 0)
    )
    
    )A
    
    GROUP BY NodeName, IP_Address, SysName, Location, NodeID
    
    
    

  • Thank you!  Is it possible to get the expiration date specific to these description? 

  • Yes, if you have pollers that are collecting the expiration date you can add them into the SQL report. Just cut/paste the lines that have 'YOURCUSTOMPOLLERNAME' in them and make sure you add a comma to them at the end except for the very last line. You can add as many as you need to the report.

  • Hi, Can you help me to arrange the script? I can't execute the required description/Label. In Fortigate License, I have two created pollers which only includes the Description (25 value) and Expiry Date (see picture below)

    When I used your provided script, this only allows me to capture the "expired date" that's not being used.
    e.g. The Poller for Description has a 25 Value and the reports only detecting the "Industrial Attack Definitions" which already expired.

    Is it possible to only get the description that I want to include on our report? Like "Firmware & General updates".