Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleOn this page

Table of Contents

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
languagebash
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 

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/synchronizersmodules/synchronizer-masterimport.cfg with  with your favourite text editor
  • modify the line "porturl" with the new port

 

Example :

Code Block
port	    url                 http://localhost:40000

 

All other

daemon

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 :

Code Block
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.

Synchronizer daemon

 

All daemons

  • Edit the file /etc/shinken/modules/synchronizer-import.cfg with your favourite text editor
  • modify the line "url" with the new port
    All other daemon

    • 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

    DaemonConfiguration 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

    Code Block
    /etc/init.d/shinken restart