No announcement yet.

Oreon automatic export?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Oreon automatic export?


    Would anyone know how to get Oreon to automatically generate & export its Nagios configuration files, ie. make this scriptable rather than having to manually press the "Export" button ??

    So far I've modified the formGenerateFiles.php file to default to the export/restart options we use here, but then can't see how to actually start the generation/export process itself. I was hoping to use wget/curl to simply hit a URL in Oreon, but unfortunately the link (/oreon/oreon.php?p=607) doesn't change in my browser when I press the "Export" button, so I'm at a dead end here as Apache's access_log gives no further information either. Knowing almost nothing about PHP coding, I also don't know how to run, or even what function to run, to do this directly.

    I'm wanting to be able to script this generate/export from Oreon automatically as part of our Nagios failover solution, as the remote MySQL database is always kept up-to-date via replication.

    We're currently running Oreon 1.3.3, with about 450 servers & 2300 services on Apache 2.0.59 on Solaris 10.

    Thanks *heaps* for any help here!!

  • #2

    After a *lot* of effort, I've finally sorted it out. I was stymied by the fact that POST parameters entered through both cURL and my two browsers' command lines were ignored by Oreon, but then wget came to the rescue!

    The two commands required (to login & then export) are:

    /usr/sfw/bin/wget --no-check-certificate --load-cookies=cookies.dat --save-cookies=cookies.dat  --keep-session-cookies --post-data="useralias=myusername&password=mypassword&submit=Login" -q -O /dev/null
    /usr/sfw/bin/wget --no-check-certificate --load-cookies=cookies.dat --save-cookies=cookies.dat  --keep-session-cookies --post-data=host="0&generate%5Bgenerate%5D=1&level%5Blevel%5D=1&comment%5Bcomment%5D=0&xml%5Bxml%5D=0&debug%5Bdebug%5D=1&move%5Bmove%5D=1&restart%5Brestart%5D=1&restart_mode%5Brestart_mode%5D=2&submit=Export&o=" -q -O /dev/null



    • #3
      Good Game ! :mrgreen:
      Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
      Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
      Fedora Core 5 - 2.6.20-1.2320