Connect with others to answer questions, gain new insights, and grow your networking knowledge.
Recently active
For any users that may be looking to leverage a query to gather information on devices to compare with an existing CMDB inventory, or looking to import data into their existing CMDB to update inventory. Please checkout this NQE: /** * @intent Basic information about Network Devices for CMDB import/compare */formatStatus(deviceSnapshotResult) = when deviceSnapshotResult is collectionFailed(collectionError) -> "Collecting - " + replace(toString(collectionError), "DeviceCollectionError.", ""); completed -> "Completed"; processingFailed(processingError) -> "Processing - " + replace(toString(processingError), "DeviceProcessingError.", "");foreach device in network.deviceslet platform = device.platformlet snapshotInfo = device.snapshotInfoforeach component in platform.componentsselect { Name: device.name, Location: device.locationName, Tags: device.tagNames, Vendor: platform.vendor, Model: platform.model, "Part Serial Number": component.serialNumb
I have several questions around the NQE api endpoint for running a queries. This endpoint has parameters for limit and offset for the number of records to skip and how many records to request.(example from the documentation){ "query": "foreach d in network.devices select { Name: d.name }", "queryId": "FQ_ac651cb2901b067fe7dbfb511613ab44776d8029", "commitId": "84f84b0c0a0a1805ddff0ca5451c2c55c58605e5", "queryOptions": { "offset": 20, "limit": 100, "sortBy": { "columnName": "Name", "order": "ASC" }, "columnFilters": [ { "columnName": "Name", "value": "MyDeviceName" } ] }, "parameters": { "mtuThreshold": 123, "ntpServers": [ "10.22.2.3", "192.33.4.1" ] }} I have a few questions, and would appreciate any guidance the community can providehow do i know the total number of records that is available ? do i just ask for the next number of records and if none are returned then i have the full set ? if i run the api fo
Introduction Hello Community! I wanted to share something I’ve been working on that may be helpful to you. It's a query designed to manipulate list arrays by transforming list elements into fixed-length strings, which then lets us easily join, split, or pop elements. NQE built-in functions provide list iteration and for the most part, this satisfies data model iteration for our queries. The approach presented here extends NQE list operation abilities to manipulate lists or extract specific values when required.To accomplish this we can apply a well known process called fixed-length string encoding which involves standardizing the length of each item in a list. By transforming variable-length strings into uniform sizes, we can “index” each item making if possible to perform operations like joining, splitting, and extracting elements. It opens up new possibilities for customizing functions beyond the basics of list iteration and hopefully, it will serve as a helpful tool when you nee
[Resolved]Hi team,when I am trying to use one NQE query for public IPs from Forward Network NQE Library to use it further more on my query, I am getting error while using this. Its showing me module error.
Hello NQE Enthusiasts, Several Months ago we posted a challenge to use NQE to solve the FizzBuzz challenge . We had so much fun we thought we would make it a reoccurring exercise to demonstrate the power of NQE and and have some more fun with it. You might be asking “What are koans”?"koans" refer to a series of small coding challenges designed to teach programming concepts, often in a particular language. The term originates from Zen Buddhism, where a "koan" is a paradoxical question or statement used to provoke deep thought and insight.We are looking forward to see how everyone solves these challenges so tune in and give it a try, there are no wrong answers :).ChallengeYour task is to calculate the age of a list of people not in human years but in “dog years”. Assuming that one human year is equivalent to seven dog years. Calculate for the following input.Input people = [ { Name: "Tom", Age: 25 }, { Name: "Jerry", Age: 30 }, { Name: "Spike", Age: 15 } ];Expected Output: [ {
I was helping some folks in getting familiar with Forward Networks, we were having trouble in adding in new devices (that already exist in the parent network) in to the already created workspace. The existing options to add devices in the workspace looks to only include ways to create new connections to those devices. But I did not see any way for me to pull in existing devices from the parent network, after the workspace was already created. Does anyone have any insight into this?
I was asked by a customer to write an NQE check that would trigger a violation if there was not an explicit deny rule at the end of an ACL list. This query breaks down the acl list by acl name leveraging the group-by qualifier. We are also leveraging the `maxBy` function to find the last entry by leveraging the lineNumber property. // /**// * @intent Find acls by name, count and last entry// * @description test if there is an explicity deny rule at end of acl list// */acl_pattern_1 = `access-list {aclName:string} {!"remark"} {action:string} {rest:(string*)}`;maxLine(l) = l.line.lineNumber;foreach device in network.deviceswhere device.platform.vendor == Vendor.CISCOlet acls = patternMatches(device.files.config, acl_pattern_1)let acl_groups = (foreach acl in acls group acl as group_acls_by_name by { deviceName: device.name, aclName: acl.data.aclName } as v select { device
Hi Team , How can i get F5 VIP Ip and Pool address details by NQE. ThanksRohit
OverviewThis solution for renumbering line number defaults in NQEs addresses the issue of zero-based indexing by adding one to the line number output, aligning it with user expectations and conventional numbering in configuration files. This adjustment enhances usability and accuracy in network management by ensuring that outputs from NQEs are more intuitive and consistent with other data sources. Additionally, the logic can be applied to child line numbers, further improving the flexibility of the solution. Benefits Improved Usability: The adjustment aligns line numbers with user expectations, making outputs more intuitive and reducing confusion during configuration management and troubleshooting. Enhanced Accuracy: By providing one-indexed line numbers, the solution minimizes errors that could arise from mismatches between displayed and expected line numbers in configurations. Flexible Application: The logic used for renumbering can be extended to child line numbers, allowing for
Under the command type F5_LTM_POOL_STATE for F5 devices, the pool and pool members are in the following format:---------------------------------------------------------------------------------------Ltm::Pool: XXX ---------------------------------------------------------------------------------------Status Availability : XXX State : XXX ... -------------------------------------------------------------- | Ltm::Pool Member: XXX -------------------------------------------------------------- | Status | Availability : XXX | State : XXX ... -------------------------------------------------------------- | Ltm::Pool Member: XXX -------------------------------------------------------------- | Status
Hi Team,Can you please help me with a NQE Query to get SNMP configured IPs on Fortinet Devices.
I have a custom source that is appending zeros to the end of the microseconds which may be the cause of FN seeing it as a Float. Would it be possible in future versions to force a string data type so it might be manipulated or is there any other way I can manage this from the FN side? Excited to begin using the date and timestamp functions. Do you think they will become data types that could be used in the extractJson strings eventually? Custom source value: extractJson code: If i change the value to Number or String the query errors because it sees that value as a Floatselect code: Result:
parserecords(ep) = foreach x in [0] let recordid = extractJson[{ kind: String, selfLink: String, items: List<{ subList:List List<{ kind: String, selfLink: String, name: String }> }> }]foreach hs in network.externalSources.httpSourcesforeach ep in hs.endpointswhere ep.name == "endpointname" && ep.statusCode == 200let recordItems = (min(parserecords(ep))).itemsforeach i in recordItemsselect { SrcName: hs.name, subListName: i.subList.name}///////////////////////// Oops! The query doesn't work ///////////////Address the following issues: - Line xx, character xx: Can't access field 'name' from 'i.subList', because that is a List<{kind: String, selfLink: String, name:String}>.
A custom source API call returns a date field in microseconds format. Does NQE have a built in function to convert? For example, 1725899407, to Sept. 9, 2024. Currently I don’t need the hours and minutes but in the future it may be necessary. I’ve searched “date” and “microseconds” in the documentation and online without success.
Borrowing a capture of the Results window from another post on this site for reference, is it possible to filter for values that are not present?For example, instead of “cisco” could I return records that are !=cisco. I understand I have the options to write it in the NQE or export into Excel and filter as a spreadsheet but it would be useful to have the ability to filter other comparison operators on the fly in the Results window.
Is there a command equivalent to str(X) in Forward Networks?
For a user defined function as follows, can it be used to return a number or does it only return a Bool value? threshold : Number = 100;hasManySubInterfaces(iface) : Bool = length(iface.subinterfaces) > threshold; Say something like the following, is that possible? threshold : Number = 100;hasManySubInterfaces(iface) : Number= length(iface.subinterfaces) + threshold;
Is there any way to order the results in the NQE output ? E.g. order by field A then field B This would be within the query rather than once the results are shown in the table below the query itself.
We were finally able to configure and get SSO online and operational this past week in our Dev environment, and pushed it in to the production world yesterday. After running fine for about 10-12 hours, we came in this morning to the following error: SAML validation failed. Invalid assertion [insert a bunch of random letters and numbers] for SAML response [insert more random letters and numbers]: Assertion IssueInstant was invalid, expiredContact your Org Admin to resolve the issue. I check with the in group that manages SSO and they claim nothing has changed on their end, so now I must ask: How do we get past this so I can turn SSO back on? P.S. we are on base 11 app version 24.8 (rolling to 24.9 in a couple hours)
Scenario: Disabled all classic and all but one custom source in order to speed up and test an NQE with extractJson on an endpoint for a specific device. Observation: Unable to take a snapshot without at least one Classic source enabled.
The ability to include/exclude custom sources in bulk in the same way as classic sources would be useful if capability is possible. Secondary to an ability to bulk include/exclude custom sources would be the ability to bulk edit custom source profiles, basic authentication, SSL validation, and location. I also noticed when editing custom source that I had to update in phases. I imported csv of devices. I then attempted to update the profile and auth and location but it stated the source already existed and when I exited it only saved one of the settings. I then edited the src again and updated the location. If I recall it was unable to edit the tags at the same time as other config fields as well. No big deal for the few devices in my workspace and I have finished update but wanted to bring to your attention.
We are thrilled to announce the release of AI Assist for NQE! Whether you're new to the platform or a seasoned NQE expert, AI Assist allows you to skip complex syntax and describe what you need in plain English, making it easier than ever to create NQE queries. Generating an NQE query using AI AssistWhat is AI Assist?AI Assist enables you to write NQE queries using everyday language. Instead of manually writing complex queries, you can simply describe what you're looking for, and AI Assist will generate the appropriate NQE query for you. For example, to create a query that lists all CVEs currently impacting devices within a network, you can type, “List CVEs impacting each device,” and NQE AI Assist will instantly translate that into a valid query. How to Use AI AssistUsing AI Assist is easy. Just follow these steps:Log in to Forward Enterprise. Navigate to the NQE Library. Open the query editor by adding a new query. Click the AI Assist button. In the Generate tab, type your natural la
Hi All, Can you please help me to write a NQE query for all ip details where BGP Admin status id is showing down.
Custom source profile with Endpoint that is using “url/path?_return_type=json-pretty” but responseBody is one long line.I attempt to use splitJsonObjects; however, it isn’t returning in a structured layout for me to pattern match.
File this under “ya I’ll never do that again”. We’ve all had at least one “oops” that sticks with us.How does one find Cisco Switches or Routers that just happen to have the same Hostname or the same Management IP Address reported in LLDP and / or CDP? What if those alleged Cisco device just happen to have the same configuration except for the out of band management address? Accidentally of course. Well, this happened during a rapid stand up of two new Cisco routers. (Not me, of course. I learned this lesson many moons ago). To speed up the deployment, a copy / paste of config from one Router to two others occurred. Oh, yes, some nasty stuff happened after this. But that’s not pertinent to the resolution.NQE to the rescue. Since the Management IP addresses were “forgotten” or unknown to those troubleshooting the issue, how does one find these near identical twins? Remember that CDP announces Serial Numbers. LLDP typically does not advertise the device’s Serial Number. Thu
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.