Announcement

Collapse
No announcement yet.

chemins en dur ?

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

  • chemins en dur ?

    bonjour,

    dans main.php:

    if (file_exists("/usr/local/nagios/var/status.log"))^M
    $log = fopen("/usr/local/nagios/var/status.log", "r");^M
    else^M
    $log = fopen("/usr/local/nagios/var/status.sav", "r");^M

    pourquoi ne pas utiliser les variables définies dans nagios.cfg ?

    ps: vive Windows pour les ^M
    Cordialement,
    cordialement,
    Mathieu Chateau
    http://www.lotp.fr

  • #2
    Tres juste, ca va etre modifié.
    Merci !
    Romain Le Merlus
    Centreon Forge
    MERETHIS

    Comment


    • #3
      chemins en dur

      hello,

      il me semble aussi que plugins.php contient /usr/local/nagios/libexec
      en dur ...

      merci !
      cordialement,
      Mathieu Chateau
      http://www.lotp.fr

      Comment


      • #4
        Bonjour,

        Un petit grep me donne:
        Code:
        class/User.class.php:   $this->nagios_pwd = "/usr/local/nagios/";
        include/graph/graph_h.php:              //http://oreon.labtech.epitech.net/oreon/graph_image.php?time=-86400&time2=0&timename=LastDay&namerrd=5.rrd&path=/usr/local/oreon/rrd/&verticallabel=label&imgformat=PNG&width=500&height=100&ColGrilFond=FFFFFF&ColFond=FEFEFE&ColPolice=000000&ColGrGril=800000&ColPtGril=808080&ColContCub=000000&ColArrow=FFFFFF&ColImHau=C0C0C0&ColImBa=909090&ds1name=DataSource1&ds2name=DataSource2&ColDs1=ff0000&ColDs2=00ff00&ds3name=DataSource3&ds4name=DataSource4&ColDs3=0000ff&ColDs4=5BACB3&flamming=no&lowerlimit=0&areads1=no&ticknessds1=2&gprintlastds1=no&gprintminds1=no&gprintaverageds1=no&gprintmaxds1=no&areads2=no&ticknessds2=2&gprintlastds2=no&gprintminds2=no&gprintaverageds2=no&gprintmaxds2=no&areads3=no&ticknessds3=2&gprintlastds3=no&gprintminds3=no&gprintaverageds3=no&gprintmaxds3=no&areads4=no&ticknessds4=2&gprintlastds4=no&gprintminds4=no&gprintaverageds4=no&gprintmaxds4=no&dsflg=1&name=SWAP
        include/calendar/calendrier.php:                                        if (file_exists("/usr/local/nagios/var/archives/nagios-".date('m', $timestamp)."-".$i."-".date('Y', $timestamp)."-00.log"))
        include/calendar/calendrier.php:                                        else if (file_exists("/usr/local/nagios/var/archives/nagios-".date('m', $timestamp)."-"."0".$t."-".date('Y', $timestamp)."-00.log"))
        include/calendar/calendrier.php:                        if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier.php:                        else if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-0".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier.php:                        if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier.php:                        else if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-0".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier_notifications.php:                                  if (file_exists("/usr/local/nagios/var/archives/nagios-".date('m', $timestamp)."-".$i."-".date('Y', $timestamp)."-00.log"))
        include/calendar/calendrier_notifications.php:                                  else if (file_exists("/usr/local/nagios/var/archives/nagios-".date('m', $timestamp)."-"."0".$t."-".date('Y', $timestamp)."-00.log"))
        include/calendar/calendrier_notifications.php:                  if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier_notifications.php:                  else if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-0".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier_notifications.php:                  if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-".$nb_day."-".$match3."-00.log"))
        include/calendar/calendrier_notifications.php:                  else if (file_exists("/usr/local/nagios/var/archives/nagios-".$match1."-0".$nb_day."-".$match3."-00.log"))
        main.php:       if (file_exists("/usr/local/nagios/var/status.log"))
        main.php:               $log = fopen("/usr/local/nagios/var/status.log", "r");
        main.php:               $log = fopen("/usr/local/nagios/var/status.sav", "r");
        notifications.php:                      if (!($log = fopen("/usr/local/nagios/var/nagios.log", "r")))
        plugins.php:                                    $chemintotal = "/usr/local/nagios/libexec/";
        resourcesCFG.php:                                                               $USER1$=/usr/local/nagios/libexec
        
        
        
        resourcesCFG.php:                                                               line : /usr/local/nagios/libexec
        Cordialement.

        Comment

        Working...
        X