Page 1 of 2
Alerting mail link IP
Posted: Fri Jun 19, 2015 8:59 am
by teirekos
When an alert is arriving in our mailboxes it has the following link:
http://127.0.0.1/var/www/html/nagioslog ... UDIud0ai1Q
Can the localhost IP be changed to the "real" IP of the server so the link can actually completely serve it's purpose.
Thanx a lot.
Re: Alerting mail link IP
Posted: Fri Jun 19, 2015 9:04 am
by eloyd
You can configure this in the administration section of NLS. Administration | Global Settings, then change the cluster hostname.
Re: Alerting mail link IP
Posted: Fri Jun 19, 2015 10:36 am
by jolson
eloyd is correct - let us know if you have any trouble with that setting.
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 9:24 am
by teirekos
Can I put an IP there?
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 9:34 am
by eloyd
Yes.
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 10:11 am
by jolson
Keep in mind that while putting an IP in that field is possible, it would be wise to use DNS if possible.
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 10:15 am
by eloyd
As an aside, I disagree, but it depends on circumstances.
IP addresses never fail lookups. DNS addresses, by nature, require a DNS server to respond (or caches from a previous lookup). So it is possible that, while an IP address may be harder for human brains to remember or interact with, it is just as useful as a DNS name and immune from DNS injection (or cache poisining) attack, server failure, DNS name resolution issues, and so forth.
And before you say "ya, but a DNS entry is easier to change" - how often do you change the cluster name of a Nagios Log Server entity?

Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 10:22 am
by jolson
I recommend using a DNS name in this field because all setup instructions will be modified to point to the IP/DNS name in the field. This means that if setup instructions are run as-is, a single node IP will be used (creating a single point of failure). It is true that DNS lookups can fail, but I don't think that excuses the single point of failure in this case, which I see as more dangerous in the long term than a proper DNS entry. All alert emails generated will also point to a single IP.
But of course, as you noted:
it depends on circumstances.
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 10:26 am
by eloyd
You are right about cluster names being DNS. For some reason, I was getting my topics confused and thought this was an HA discussion.
Please consider my previous disagreement retracted and yes, the cluster name should be a DNS entry, and if there are multiple servers, then it is easiest to set up as a round-robin list of servers that participate.
Re: Alerting mail link IP
Posted: Mon Jun 22, 2015 10:59 am
by jolson
teirekos,
Let us know if you have any questions. Thanks!