[ZBXNEXT-4650] Monitor Multiple TCP Port Created: 2018 Jul 23  Updated: 2018 Jul 24  Resolved: 2018 Jul 23

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Server (S), Templates (T)
Affects Version/s: 3.4.11
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Magrabur Alam Sofily Assignee: Unassigned
Resolution: Commercial support required Votes: 0
Labels: items, triggers
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix server on Ubuntu 16.04.4 32 bit server
Zabbix agent on Ubuntu 16.04.4 32 bit desktop


Issue Links:
Duplicate
duplicates ZBX-14633 Monitor Multiple TCP Port Closed

 Description   

Dear Team,

I have installed Zabbix server on my Ubuntu 16.04.4 (32 bit) server and Zabbix agent on Ubuntu 16.04.4 (32 bit) desktop. I would like to monitor multiple TCP ports on my desktop through Zabbbix agent. I have already configured an item with net.tcp.listen[port] and trigger with {Template OS Linux:net.tcp.listen[600].last()}=1 however as I noticed I can monitor only one port at a time. My target is to monitor multiple ports (e.g 500-600,650,651,700-25000). Please guide me how I can configure such item and trigger to fulfill my target.

 

Many thanks in advance for your time



 Comments   
Comment by Magrabur Alam Sofily [ 2018 Jul 23 ]

Dear Dimir,

I am not sure if you have understood my problem scenario. I understand that I can monitor a single port using net.tcp.listen[port]. However my target is to monitor a range of ports. I am sure if I need to monitor all 65k+ ports, it will be tough to configure 65k+ items and triggers. Hope you understand the problem statement now.

 

Many thanks in advance for your time.

Comment by dimir [ 2018 Jul 23 ]

I'm not sure it's useful to return single value when monitoring different things. I think what you need is lld (low-level discovery). Automatically discover open TCP ports in a range and create an item+trigger for each.

https://www.zabbix.com/documentation/4.0/manual/discovery/low_level_discovery

Or you can use other people's work:

https://www.zabbix.org/wiki/Discovery_of_TCP_services

Comment by Aleksejs Petrovs [ 2018 Jul 23 ]

Hello Magrabur,

I don't think that this option is possible.

The item check is being processed by the dedicated process. Imagine that in your scenario you want to monitor all 65k ports and if this would be a single item - it will be passed to the single process and your process will do it for forever(or timeout will drop the check ) In example, launch the nmap with that port range and check when this will be finished.

Anyway, you can find the service discovery template in https://share.zabbix.com to discover the open port.

Regards,
Aleksejs!

Comment by Magrabur Alam Sofily [ 2018 Jul 23 ]

Dear Aleksejs,

Thanks for your time. I think discovery option might be quite useful for me. I know what ports should be open on my system, now if I run this after a certain internal and compare then I will know if any unwanted port is open or not. Could you please help me how I can configure the service discover to discover open ports on Zabbix.

Many thanks in advance for your time.

 

Comment by Aleksejs Petrovs [ 2018 Jul 23 ]

You are welcome,

You can follow the instructions here.

Please note that ZBXNEXT is for feature request only not a free support page. For free support please follow this link, or you can ask a support from Zabbix Professionals.

Closing this as Commerical support required

Regards,
Aleksejs!

Generated at Thu Mar 28 16:34:01 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.