Announcement

Collapse
No announcement yet.

Centreon CLAPI - Schedulle Downtime

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

  • Centreon CLAPI - Schedulle Downtime

    Hello all,
    I am using Centrone 2.7.8 CLAI
    I follow the documentation https://documentation.centreon.com/d...specificperiod
    But I can not get it to work, even with same commands as the example.

    I try:

    ./centreon -u admin -p reon-o DOWNTIME -a ADD -v "mydowntime;my new downtime name"
    ./centreon -u admin -p reon -o DOWNTIME -a ADDSPECIFICPERIOD -v "mydowntime;9:35;9:55;1;;friday;first"
    ./centreon -u admin -p reon -o DOWNTIME -a ADDHOST -v "mydowntime;SERVER1"

    LIST
    ./centreon -u admin -p centreon -o DOWNTIME -a LISTPERIODS -v "mydowntime"

    position;start time;end time;fixed;duration;day of week;day of month;month cycle
    1;10:23:00;10:55:00;1;;5;;first

    But on the Web interface I see nothing under Downtime



    Anybody else had this problem? Is it a bug ?
    ________________________________________
    CentOS 5.5 x64 / Nagios 3.2.2 / Centreon 2.1.10
    Monitoring: 467 Hosts / 2109Services 16th Server
    NdoUtils 1.49,NagiosPlugins 1.4.14, NagVis 1.5.1, Distributed Architeture(howto)

    Nagios/Centreon Custom Scripts / Troubleshooting
    www.felipeferreira.net

  • #2
    got it working using old nagios way:

    now=`date +%s`
    F="/var/lib/centreon-engine/rw/centengine.cmd"
    L="ack.log"

    if [ -z $4 ]; then
    echo "ERRRO - missing arguments: $0 host_name service author comment "
    exit 1
    else
    host_name=$1
    service=$2
    author=$3
    comment=$4
    fi

    /usr/bin/printf "[%lu] ACKNOWLEDGE_SVC_PROBLEM;${host_name};${service};1; 0;1;${author};"${comment}"\n" $now > $F

    /usr/bin/printf "[%lu] ACKNOWLEDGE_SVC_PROBLEM;${host_name};${service};1; 0;1;${author};"${comment}"\n" $now >> $L

    echo "OK"
    exit 0

    ________________________________________
    CentOS 5.5 x64 / Nagios 3.2.2 / Centreon 2.1.10
    Monitoring: 467 Hosts / 2109Services 16th Server
    NdoUtils 1.49,NagiosPlugins 1.4.14, NagVis 1.5.1, Distributed Architeture(howto)

    Nagios/Centreon Custom Scripts / Troubleshooting
    www.felipeferreira.net

    Comment

    Working...
    X