Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FlowDAO

DAO for accessing flow (Netflow/IPFIX/sFlow) data.

Hierarchy

Index

Constructors

constructor

Accessors

http

server

Methods

Private checkForEnhancedFlows

  • checkForEnhancedFlows(): void
  • Check if this version of OpenNMS supports enhanced flow API and if not throw an error.

    Returns void

getApplications

  • getApplications(prefix?: string, start?: number, end?: number, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Enumerate the applications matching the given prefix and filters.

    Parameters

    • Optional prefix: string

      the prefix to match

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

Protected getCount

  • getCount(data: any): number
  • A convenience method to make it easy for implementers to extract the count (or totalCount) values from response data.

    Parameters

    • data: any

    Returns number

getExporter

  • getExporter(criteria: string, limit: number, start?: number, end?: number): Promise<OnmsFlowExporter>
  • Get detailed information about a specific node.

    Parameters

    • criteria: string

      the node ID or foreignSource:foreignId tuple

    • limit: number

      maximum number of interfaces to return (those with the most flows will be returned if the results are truncated)

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    Returns Promise<OnmsFlowExporter>

getExporters

  • Get a summary of the nodes that have exported flows.

    Parameters

    • limit: number

      maximum number of exporters to return (those with the most flows will be returned if the results are truncated)

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    Returns Promise<OnmsFlowExporterSummary[]>

getHosts

  • getHosts(pattern?: string, start?: number, end?: number, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Enumerate all the hosts matching the given pattern and filters.

    Parameters

    • Optional pattern: string

      the regex pattern to match

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSeriesForApplications

  • getSeriesForApplications(applications?: string[], start?: number, end?: number, step?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the top N applications/protocols based on parameters.

    Parameters

    • Optional applications: string[]

      the applications to include

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given applications

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSeriesForConversations

  • getSeriesForConversations(conversations?: string[], start?: number, end?: number, step?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the given conversations based on parameters.

    Parameters

    • Optional conversations: string[]

      how many conversations' series to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given conversations

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSeriesForHosts

  • getSeriesForHosts(hosts?: string[], start?: number, end?: number, step?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the given hosts based on parameters.

    Parameters

    • Optional hosts: string[]

      the hosts to include

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given hosts

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSeriesForTopNApplications

  • getSeriesForTopNApplications(N?: number, start?: number, end?: number, step?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the top N applications/protocols based on parameters.

    Parameters

    • Optional N: number

      how many applications' series to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the top N

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSeriesForTopNConversations

  • getSeriesForTopNConversations(NOptions?: number | ITopNOptions, start?: number, end?: number, step?: number, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the top N conversations based on parameters.

    Parameters

    • Optional NOptions: number | ITopNOptions

      how many conversations to return or an object that includes all of the parameters to be set on the API call

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSeriesForTopNHosts

  • getSeriesForTopNHosts(N?: number, start?: number, end?: number, step?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowSeries>
  • Get time series data for the top N hosts based on parameters.

    Parameters

    • Optional N: number

      how many applications' series to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional step: number

      the requested time interval between rows

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the top N

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowSeries>

getSummaryForApplications

  • getSummaryForApplications(applications?: string[], start?: number, end?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the given applications/protocols based on parameters.

    Parameters

    • Optional applications: string[]

      the applications to include

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given applications

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSummaryForConversations

  • getSummaryForConversations(conversations?: string[], start?: number, end?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the given conversations based on parameters.

    Parameters

    • Optional conversations: string[]

      how many conversations to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given conversations

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSummaryForHosts

  • getSummaryForHosts(hosts?: string[], start?: number, end?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the given hosts based on parameters.

    Parameters

    • Optional hosts: string[]

      the hosts to include

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the given hosts

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSummaryForTopNApplications

  • getSummaryForTopNApplications(N?: number, start?: number, end?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the top N applications/protocols based on parameters.

    Parameters

    • Optional N: number

      how many applications to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the top N

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSummaryForTopNConversations

  • getSummaryForTopNConversations(NOptions?: number | ITopNOptions, start?: number, end?: number, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the top N conversations based on parameters.

    Parameters

    • Optional NOptions: number | ITopNOptions

      how many conversations to return or an object that includes all of the parameters to be set on the API call

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

getSummaryForTopNHosts

  • getSummaryForTopNHosts(N?: number, start?: number, end?: number, includeOther?: boolean, exporterNodeCriteria?: string, ifIndex?: number): Promise<OnmsFlowTable>
  • Summarize the top N hosts based on parameters.

    Parameters

    • Optional N: number

      how many conversations to return

    • Optional start: number

      the start of the timespan to query (defaults to 4 hours ago)

    • Optional end: number

      the end of the timespan to query (defaults to now)

    • Optional includeOther: boolean

      include an additional "other" result that represents everything that does not match the top N

    • Optional exporterNodeCriteria: string

      the node ID or foreignSource:foreignId tuple

    • Optional ifIndex: number

      filter for flows that came through this SNMP interface

    Returns Promise<OnmsFlowTable>

Protected onSetServer

Protected toDate

  • toDate(from: any): Moment | undefined
  • Convert the given value to a date, or undefined if it cannot be converted.

    Parameters

    • from: any

    Returns Moment | undefined

Protected toNumber

  • toNumber(from: any): number | undefined
  • Convert the given value to a number, or undefined if it cannot be converted.

    Parameters

    • from: any

    Returns number | undefined

Protected useJson

  • useJson(): boolean

Static Protected getOptions

Generated using TypeDoc