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
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
netstat -laputen | grep ":40000"
Having no result mean the port is available and not in use.
You can find more informations about the daemon here : Daemons
Port modification
Depending of the daemon your want to modify, the configuration file will not be located at the same place.
Synchronizer daemon
- Edit the file /etc/shinken/modules/synchronizer-import.cfg with your favourite text editor
- modify the line "url" with the new port
Example :
url http://localhost:40000
All other daemons
Apply to the following daemons : brokerd, pollerd, reactionnerd, receiverd, schedulerd
- Edit the file /etc/shinken/daemons/{DAEMON_NAME}.ini with your favourite text editor
- modify the line "port" with the new port
Example :
port=40001
Modify the arbiter resource
Now that you modified the daemon port, you need to modify the arbiter resource to know about the change.
All daemons
Edit the file /etc/shinken/{DAEMON_NAME}/{CFG_FILE} with your favourite text editor
modify the line "port" with the new port
Here are the default daemon configuration file found on the arbiter server
| Daemon | Configuration file |
|---|---|
| broker | /etc/shinken/broker/broker-master.cfg |
| poller | /etc/shinken/poller/poller-master.cfg |
| reactionner | /etc/shinken/reactionner/reactionner-master.cfg |
| receiver | /etc/shinken/receiver/receiver-master.cfg |
| scheduler | /etc/shinken/scheduler/scheduler-master.cfg |
| synchronizer | /etc/shinken/synchronizers/synchronizer-master.cfg |
Restart Shinken
/etc/init.d/shinken restart