Announcement

Collapse
No announcement yet.

managing optionnal argument in command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • managing optionnal argument in command

    Hi

    i have a little problem in centreon 2.5.1

    i want to install a plugin to monitor my equalogics
    i have downloaded a script wich run quite well in comand line.

    with this script i can check several things

    this script is in the form

    script -H $HOSTADDRESS$ -t $ARG1$ -c $ARG2$ -w $ARG3$ -v $ARG4$

    the threee last argument are optionnal
    the first one defined the service we check then it s the only argument required

    but when i create a service the interface want absolutely a value for these arguments.
    how can i make them optionnal?

  • #2
    HI

    You can't define an optionnal argument

    Juste define two commands and use the corrrect one
    script -H $HOSTADDRESS$ -t $ARG1$ -c $ARG2$ -w $ARG3$
    script -H $HOSTADDRESS$ -t $ARG1$ -c $ARG2$ -w $ARG3$ -v $ARG4$
    Centreon Syslog Module Manager/Developper
    Centreon E2S Module Manager/Developper
    Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
    Nagios 3.x et NDOutil 1.x

    Comment

    Working...
    X