Page 1 of 1
IP address changing
Posted: Wed Jan 22, 2025 6:50 am
by tryingtobeIT
Hi there,
What is the best way to change my Nagios XI to a static IP so that I continue to receive the same IP address each time I load?
Re: IP address changing
Posted: Wed Jan 22, 2025 9:46 am
by sawdusty
What OS is your NagiosXI running on? For Ubuntu, look at netplan to set your static IP. For Windows, look at Settings>Network & Internet so change from DHCP to manual. Whatever OS you're running, make sure you don't assign an address already in use.
Re: IP address changing
Posted: Wed Jan 22, 2025 9:55 am
by lgute
Hi
@tryingtobeIT,
Thanks for reaching out. Depending on which operating system XI is installed on, there will be a few steps to do to set a static IP. So the first question is which distribution and version are you using?
Re: IP address changing
Posted: Wed Jan 22, 2025 3:09 pm
by tryingtobeIT
Hi,
Windows 10 and Ubuntu 24.04.
Thanks!
Re: IP address changing
Posted: Wed Jan 22, 2025 5:40 pm
by cnorell
tryingtobeIT,
First, a disclaimer: this is outside of the bounds of what Nagios can officially support, as it will touch several pieces of your infrastructure not directly related to your Nagios XI instance. Specifically, this change needs to happen on the operating system level first to set the machine's IP address, then you can update your IP in the XI interface.
On Ubuntu 24, you will be interacting with Netplan configuration files. I believe these live in
/etc/netplan/. Find the existing YAML config file, or create one if none exist. A good name could be
01-netcfg.yaml if you need to create one.
An example configuration could look something like:
Code: Select all
network:
version: 2
renderer: networkd
ethernets:
<interface_name>:
dhcp4: no
addresses:
- <desired_ip_address>/<subnet_mask>
routes:
- to: default
via: <default_gateway_ip>
nameservers:
addresses: [<dns_1_ip>, <dns_2_ip>]
To find the interface name, run
ip link.
If you created a new config file, ensure you set reasonable permissions:
Code: Select all
sudo chmod 600 /etc/netplan/<your_config>.yaml
Apply the config:
Check your work:
Once the machine's IP address is worked out, set the same IP address in XI as the
Program URL. Navigate to:
Admin > System Config > System Settings > Program URL, enter the static IP you set earlier and click
Update Settings.
Hope this helps!