Multiple Servers, same IP, different port

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
avent
Posts: 4
Joined: Tue Apr 05, 2016 6:58 am

Multiple Servers, same IP, different port

Post by avent »

Hi. I'm using Cacti to monitor several servers behind the same IP and different ports:

server1 a.b.c.d 161 for the firewall
server2 a.b.c.d 20161 with firewall SNAT to the real server2:161
server3 a.b.c.d 20162 with firewall SNAT to the real server3:161
server4 a.b.c.d 20163 with firewall SNAT to the real server4:161

and it works flawlessly.

The problem begins when one of the internal server is down: Cacti believes that all servers behind the same IP is down (it isn't checks the combination IP/port). The system then sends email that all hosts are down but the poller still gets SNMP traffic from the others.

When we disable the problematic host everything returns to normal.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Multiple Servers, same IP, different port

Post by phalek »

Do you check the reachability (host down) with "PING and SNMP" or with "SNMP" only ?

The later one shouldn't have this problem
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
avent
Posts: 4
Joined: Tue Apr 05, 2016 6:58 am

Re: Multiple Servers, same IP, different port

Post by avent »

Hi phalek, thanks for your answer.

I'm using "SNMP uptime" setting for all hosts, since all hosts are behind the the same IP and the PING doesn't make sense.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Multiple Servers, same IP, different port

Post by phalek »

I think it still does a ping before trying to do a SNMP request.
Try disabling the down check for these hosts ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
avent
Posts: 4
Joined: Tue Apr 05, 2016 6:58 am

Re: Multiple Servers, same IP, different port

Post by avent »

Strange answer :o

Why there is a different option for PING+SNMP and SNMP if they are doing ping check ?
If I disable the down check how would I know if the host(s) are up or down ?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Multiple Servers, same IP, different port

Post by phalek »

Just checked the code. Yes it does a ping, but a "snmp ping" ...

Couldn't you do a ping on the specified SNMP port e.g. 20161 ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
avent
Posts: 4
Joined: Tue Apr 05, 2016 6:58 am

Re: Multiple Servers, same IP, different port

Post by avent »

As far as I know (and correct me If i'm wrong) there is no special SNMP ping. The only I can do is to grab using snmpwalk a general host information (i.e. the name of the host) but in my case snmpwalk works and returns all values and Cacti believed that all hosts are down.

What exactly Cacti means by SNMP ping ? What the code does before SNMP check ?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Multiple Servers, same IP, different port

Post by phalek »

Cacti is calling a function of the "Net_Ping" class, which actually just does a snmpget request.

Now with pinging the port, you should be able to do a availability method: "Ping", type: udp and as the port, using the SNMP port you set for that specific device
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests