How do the channel definitions work for custom packet sniffer, flow (NetFlow, sFlow, jFlow), and IPFIX sensors?
How do the channel definitions for custom packet sniffing, flow, and IPFIX sensors work?
This article applies as of PRTG 22
Channel definitions for custom Packet Sniffer, flow, or IPFIX sensors
When you add custom flow (for example, NetFlow, sFlow, or jFlow), custom IPFIX (included in PRTG 13.x.7 or later), or custom packet sniffing sensors to PRTG, you will notice a field named Channel Definition. In this field, you must provide the channel definitions in the following way (one entry per channel):
#5:HTTP Protocol[TCP] and (SourcePort or DestinationPort or SourcePort or DestinationPort)
- The <id> needs to be 1 or a higher number and must be unique for the sensor. This means that each channel definition must have a unique ID.
- The <id> is linked to the historic data. Important: As soon as you change the ID, you break the connection to the history for this particular channel and you will lose its historic data.
- A rule can span multiple lines.
- A new rule starts with # as the first character in a line.
- <name> is the channel's display name.
- The rules are processed from top to bottom (the number does not matter) and the data is accounted to the first match.
- An other channel is added automatically.
- After <name>, you can write an optional [<unit>] to override the unit that is automatically set based on the source sensors.
For the specific rule syntax, see What filter rules can be used for custom Packet Sniffing, flow (NetFlow/sFlow/jFlow), or IPFIX sensors?.
Because the data is always accounted to the first match, make sure you start with the most specific rule at the top and to get less specific toward the bottom.
We strongly recommend that you write the rule list in an external editor first and then paste it into the corresponding settings field. Otherwise, if the rules contain an error, the entries will be removed when you add the rules.
Channel definition example for differentiating by protocol:
#1:TCP Protocol[TCP] #2:UDP Protocol[UDP] #3:ICMP Protocol[ICMP]
This was very helpfull. I use PRTG V8 and I had to create a new Sensore for my Probe.
>Packet Sniffer (Costum)
And I added this Line:
Protocol[TCP] and (SourcePort or DestinationPort)"
But before I added the Detail definitions.
I've set up a custom V9 workflow sensor to capture all the specific protocols the generic sensor does now. I've got two channels defined.
- 5:SMB Protocol[UDP] and (SourcePort or DestinationPort
- 6:ExacqVision Protocol[TCP] and (SourcePort or DestinationPort[22609D
Do I use filters to capture just these two protocols and if so, what is the syntax for those? The manual has nothing about multiple filters. This syntax does not appear to be working.
Protocol[UDP] and (SourcePort or DestinationPort) or Protocol[TCP] and (SourcePort or DestinationPort)
In which sense are you speaking about multiple filters? The filter definitions can combine several filter statements with AND, OR, as well as brackets.
It is also possible to define several channels.
However, any traffic which is already accounted for in a channel, is not considered for further filter evaluation of the other channels, even if the according filter rules apply.