PDA

View Full Version : Host and ports


bashman
04-02-2010, 09:46
Hi,

I want to use zabbix agent (port 10050) and zapcat (10052) for the same host.

Can I have these two ports in the same host?.

Thanks.

jph98
04-06-2010, 23:51
I'd like to know exactly the same thing... anybody got any ideas?

chriso
10-06-2010, 19:43
Yes this works just fine. All you are doing with zapcat is starting another thread that uses a particular port. Nothing is stopping you from using any number of unused ports. In my scenario, I run the zabbix agent (10050) along with 10 java processes (in their own JVM) that each have zapcat running, using ports 7800-7810. I start zapcat with a configurable port.

jph98
10-06-2010, 20:02
When you create a new host you're prompted for the Zabbix agent port (10050). In the Zapcat setup instructions it specifies that you need to configure this value for Zapcat instead (10052):

http://www.kjkoster.org/zapcat/How_To.html

This means you can't have a Zapcat and Zabbix Agent running on the same host... and it's not possible to create two hosts with the same name right so how did you set this up?

chriso
10-06-2010, 22:34
When you create a new host you're prompted for the Zabbix agent port (10050). In the Zapcat setup instructions it specifies that you need to configure this value for Zapcat instead (10052):

http://www.kjkoster.org/zapcat/How_To.html

This means you can't have a Zapcat and Zabbix Agent running on the same host... and it's not possible to create two hosts with the same name right so how did you set this up?

I didn't read it this way, but I can see how this might be confusing. There is nothing stopping you from creating multiple "hosts" with the same IP, but different ports. In the zapcat instructions, he first listed port 10052 because that is the default zapcat port. Further down the page he uses port 10049 as an example to show that the port is configurable. He never said that you can't have a zapcat agent and zabbix agent running on the same host. They are simply two different "sources" from which the zabbix server logs data.

Also...you are correct that you can't have 2 hosts with the same name..but "name" is only an identifier. What matters is the dns name and/or ip of the host.

Here is what I have running on one server:
1) The zabbix server
2) a zabbix agent listening on 10050
3) 10 separate JVMs, each having their own zapcat (each with a unique port)

Here is a jumpled screenshot of my hosts screen

jph98
10-06-2010, 23:07
Right, understand. It's a Zabbix error message that is misleading - you can't have identical names for your host entries, they have to have different names when you create them: i.e.

Name: server1 ZABBIX agent
DNS Entry: server1.example.com
IP Address: 192.168.1.11
Port: 10050

Name: server1 ZAPCAT agent
DNS Entry: server1.example.com
IP Address: 192.168.1.11
Port: 10052

Thanks for the clarification on that...

bashman
09-09-2010, 09:44
I would like to have one host in Zabbix, monitored through Zapcat and Agent on the same port, 10050. Is it possible?.

bashman
09-09-2010, 09:46
In Jboss is possible using twiddle.sh locally through the Agent.

chriso
09-09-2010, 18:26
I would like to have one host in Zabbix, monitored through Zapcat and Agent on the same port, 10050. Is it possible?.

You mean the zapcat agent AND zabbix agent both on 10050? No..you will get a "address already in use" message (from Java anyway).

walterheck
10-09-2010, 07:30
Actually, that is possible. If you make zapcat use only active items and zabbix agent only passive (or the other way around) you can set DisablePassive and DisableActive in your config file and then it should be possible, since only one of the two will actually need to be listening at all.

bashman
10-09-2010, 08:47
Actually, that is possible. If you make zapcat use only active items and zabbix agent only passive (or the other way around) you can set DisablePassive and DisableActive in your config file and then it should be possible, since only one of the two will actually need to be listening at all.

Right, I see, so setting DisablePassive=1 in zabbix_agentd.conf, the agent will not listen on any TCP port.

I will have to use zabbix agent (active) type checks for the agent, and Zapcat can be listening on port 10050.

Then it will be possible to have one host with one port using Zabbix agent and Zapcat.

Thanks walterheck.