Overview
This document describes how you can change the default daemons port.
What you will have to do ?
In order to change a daemon port, you will have to :
- change the port of the daemon itself
- change the arbiter resource to know about the new port
| Panel | ||
|---|---|---|
| ||
|
Modify the daemon port
Check choosen port availability
First of all, you have to know if the port you want to use is available or not.
Let's say you want to use the port 40000 as a new port, type the following command in your shell
| Code Block | ||
|---|---|---|
| ||
netstat -laputen | grep ":40000" |
Having no result mean the port is available and not in use.
| Tip |
|---|
You can find more informations about the daemon here : Daemons |
Port modification
Synchronizer daemon
- Edit the file /etc/shinken/synchronizers/synchronizer-master.cfg with your favourite text editor
- modify the line "port" with the new port
Example :
| Code Block |
|---|
port 40000 |
All other daemon
- Edit the file /etc/shinken/daemons/{DAEMON_NAME}.ini
- modify the line "port" with the new port
Example :
| Code Block |
|---|
port 40001 |
Modify the daemon resource
At this step, if you restart shinken service your daemon will be listening on new port but the arbiter is not configured to query on the right port.You have to change the daemon ressource on the arbiter server.
Change arbiter ressource
- For all daemons except synchronizer, edit ressource .cfg file in daemon ressource directory (ie. /etc/shinken/pollers/ for a poller) and change port directive.
For synchronizer daemon, you must change : /etc/shinken/modules/synchronizer-import.cfg.
Restart Shinken arbiter service