-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit aa4543d
Showing
5,903 changed files
with
1,308,311 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
tmp/* | ||
[Cc]onfig/core.php | ||
[Cc]onfig/database.php | ||
app/tmp/* | ||
app/[Cc]onfig/core.php | ||
app/[Cc]onfig/database.php | ||
!empty | ||
lib/Cake/Console/Templates/skel/tmp/* | ||
._* | ||
.DS_Store | ||
.AppleDouble | ||
.afp* | ||
app/tmp_cli/* | ||
.nfs* | ||
.idea/* | ||
/nbproject/private/* | ||
app/Plugin/AutoreportModule/webroot/tmp/* | ||
app/webroot/userimages/* | ||
app/webroot/img/graphs/* | ||
app/webroot/img/charts/* | ||
app/Plugin/MapModule/webroot/img/backgrounds/* | ||
app/Plugin/MapModule/webroot/img/icons/* | ||
*.swp | ||
*.swo | ||
app/webroot/js/compressed_components.js | ||
app/webroot/js/compressed_controllers.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine on | ||
RewriteRule ^$ app/webroot/ [L] | ||
RewriteRule (.*) app/webroot/$1 [L] | ||
</IfModule> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# What is openITCOCKPIT? | ||
openITCOCKPIT is an Open Source system monitoring tool build for different monitoring engines like [Nagios](https://www.nagios.org/) or [Naemon](http://www.naemon.org/). | ||
|
||
So easy that everyone can use it: create your entire monitoring configuration with a few clicks due to our smart interface wirtten in PHP | ||
|
||
# System requirements | ||
* Ubuntu 14.04 LTS x64 | ||
* 2 CPU cores | ||
* 2 GB RAM | ||
* 15 GB space | ||
|
||
### Production system sizing | ||
Unfortunately there is no golden rule for the right sizing of a monitoring system. This depends on the amount of hosts and services you like to monitor. | ||
|
||
Please keep in mind that a monitoring system usually will create more I/O than your KVM farm! | ||
|
||
A rough guide: | ||
* 32 GB RAM | ||
* 16 CPU Cores | ||
* 500GB space | ||
|
||
# Installation | ||
openITCOCKPIT runs on Ubuntu systems and is available in the package manager apt. | ||
|
||
To install openITCOCKPIT on your system, just run the following commands. | ||
|
||
If [phpMyAdmin](https://www.phpmyadmin.net/) asks you for your web server **leave the selection blank** and continue with **Ok**. | ||
|
||
openITCOCKPIT uses Nginx as webserver and will generate the configuration for phpMyAdmin automatically for you. | ||
```` | ||
echo 'deb http://apt.open-itcockpit.com trusty main' > /etc/apt/sources.list.d/openitcockpit.list | ||
adv --recv --keyserver hkp://keyserver.ubuntu.com A7D3EAFA | ||
apt-get update | ||
apt-get install openitcockpit{,-nagios,-ndoutils,-npcd} | ||
/usr/share/openitcockpit/app/SETUP.sh | ||
```` | ||
|
||
# Features | ||
* Easy to use web interface | ||
* Template based configuration that will make your life easier | ||
* MySQL based | ||
* REST API | ||
* Inbuilt package manager everyone can provide Add-ons for extending the interface | ||
* HA cluster ready | ||
* Two-factor authentication | ||
* LDAP authentication | ||
* Multitenancy | ||
* Object permissions | ||
* [Distributed Monitoring](http://www.it-novum.com/blog/distributed-monitoring-mit-openitcockpit-phpnsta/) | ||
* [Mod-Gearman](http://mod-gearman.org/) | ||
* [Statusengine](http://statusengine.org/) | ||
* And much more to discover... | ||
|
||
# Vagrant box [Repository](https://github.com/it-novum/vagrantboxes) | ||
If you like to try openITCOCKPIT you can install our Vagrant box | ||
* Install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads) on your system | ||
```` | ||
apt-get install vagrant virtualbox | ||
```` | ||
* Download the [Vagrantfile](https://raw.githubusercontent.com/it-novum/vagrantboxes/master/openITCOCKPIT_V3/Vagrantfile) | ||
```` | ||
mkdir openITCOCKPIT_V3 | ||
cd openITCOCKPIT_V3 | ||
wget https://raw.githubusercontent.com/it-novum/vagrantboxes/master/openITCOCKPIT_V3/Vagrantfile | ||
```` | ||
* Run the Vagrant box and follow the instructions | ||
```` | ||
vagrant up | ||
```` | ||
|
||
# Developers welcome | ||
openITCOCKPIT's development is publicly available in GitHub. Everybody is welcomed to join :-) | ||
|
||
### Vagrant box (nightly) | ||
Use [this Vagrantfile](https://raw.githubusercontent.com/it-novum/vagrantboxes/master/openITCOCKPIT_V3-nightly/Vagrantfile) to install the latest nightly build | ||
|
||
# Need help or support? | ||
* Join [#openitcockpit](http://webchat.freenode.net/?channels=openitcockpit) on freenode.net | ||
* [Community forum](http://openitcockpit.org/forum.html) | ||
* [it-novum GmbH](http://www.it-novum.com/en/support-openitcockpit-en.html) provides commercial support | ||
|
||
# License | ||
Copyright (C) <2015> <it-novum GmbH> | ||
|
||
|
||
openITCOCKPIT is dual licensed | ||
|
||
|
||
1) | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
|
||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
|
||
2) | ||
If you purchased an openITCOCKPIT Enterprise Edition you can use this file | ||
under the terms of the openITCOCKPIT Enterprise Edition licence agreement. | ||
Licence agreement and licence key will be shipped with the order | ||
confirmation. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine on | ||
RewriteRule ^$ webroot/ [L] | ||
RewriteRule (.*) webroot/$1 [L] | ||
</IfModule> | ||
<Files ~ "^\._"> | ||
Order Allow,Deny | ||
Deny from all | ||
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is an plain PHP API example. We cant recommand this way, because its a lot of work to make this thing work. | ||
Take a look a the example, that is using a PHP lib for the requests... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Netscape HTTP Cookie File | ||
# http://curl.haxx.se/docs/http-cookies.html | ||
# This file was generated by libcurl! Edit at your own risk. | ||
|
||
#HttpOnly_172.16.2.44 FALSE / TRUE 1405355442 itnovum kg5p9m8r2qqfkl9uai4auechg5 | ||
172.16.2.44 FALSE / FALSE 1406550642 CT[CTUser] Q2FrZQ%3D%3D.YZyjq8z8GhSS9vithtSq1PV4FgCA%2BfUSDbq3m9ikFUvuVClXYtKCLlvQoFP5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/usr/bin/php | ||
<?php | ||
|
||
$API = new oITCv3APIExamples(); | ||
|
||
$API->loadCommands(); | ||
|
||
$API->createCommand([ | ||
'name' => 'API created', | ||
'command_line' => '$USER1$/check_api.php $ARG1$', | ||
'command_type' => 1 | ||
]); | ||
|
||
|
||
|
||
$API->close(); | ||
|
||
class oITCv3APIExamples{ | ||
function __construct(){ | ||
$this->server = "https://172.16.2.44"; | ||
$this->username = "[email protected]"; | ||
$this->password = "asdf12"; | ||
$this->remember_me = 1; | ||
$this->_cookieFileLocation = dirname(__FILE__).'/cookie.txt'; | ||
$this->verbose = true; | ||
$this->data = []; | ||
error_reporting(E_ALL); | ||
$this->_init($this->server); | ||
$this->_login(); | ||
} | ||
|
||
public function loadCommands(){ | ||
$url = $this->_appendUrl('Commands/index/.json'); | ||
$this->_sendRequest($url); | ||
print_r(json_decode($this->data)); | ||
} | ||
|
||
public function createCommand($fields){ | ||
$url = $this->_appendUrl('Commands/add/'); | ||
$query = '_method=POST&data[Command][name]='.$fields['name'].'&data[Command][command_line]='.$fields['command_line'].'&data[Command][command_type]='.$fields['command_type']; | ||
$this->_sendRequest($url, $query); | ||
} | ||
|
||
private function _login(){ | ||
$url = $this->_appendUrl('login/login'); | ||
$fields = [ | ||
'email' => rawurlencode($this->username), | ||
'password' => rawurlencode($this->password), | ||
'remember_me' => rawurlencode($this->remember_me) | ||
]; | ||
|
||
$query = '_method=POST&data[LoginUser][email]='.$fields['email'].'&data[LoginUser][password]='.$fields['password'].'&data[LoginUser][remember_me]='.$fields['remember_me']; | ||
|
||
curl_setopt($this->ch, CURLOPT_POST, true); | ||
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $query); | ||
|
||
curl_setopt($this->ch, CURLOPT_URL, $url); | ||
$login = curl_exec($this->ch); | ||
$this->close(); | ||
} | ||
|
||
private function _init($url){ | ||
$this->ch = curl_init(); | ||
curl_setopt($this->ch, CURLOPT_URL, $url); | ||
curl_setopt($this->ch, CURLOPT_HEADER, 0); | ||
curl_setopt($this->ch, CURLOPT_TIMEOUT, 10); | ||
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1); | ||
curl_setopt($this->ch, CURLOPT_COOKIESESSION, true); | ||
curl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->_cookieFileLocation); | ||
curl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->_cookieFileLocation); | ||
curl_setopt($this->ch, CURLOPT_VERBOSE, $this->verbose); | ||
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false); //accept every SSL cert | ||
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, false); //dont check host | ||
} | ||
|
||
private function _appendUrl($url){ | ||
return $this->server . '/' . $url; | ||
} | ||
|
||
public function close(){ | ||
curl_close($this->ch); | ||
} | ||
|
||
private function _sendRequest($url, $query = ''){ | ||
$this->_init($url); | ||
if($query !== ''){ | ||
curl_setopt($this->ch, CURLOPT_POST, true); | ||
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $query); | ||
} | ||
$this->data = curl_exec($this->ch); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Many thanks for the httpful lib :-) | ||
https://github.com/nategood/httpful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/php | ||
<?php | ||
/* | ||
* This example shows you how to create, update and delete a command (CRUD) | ||
*/ | ||
|
||
require_once 'httpful/bootstrap.php'; | ||
|
||
//use Httpful\Request; | ||
login(); | ||
function createCommand(){ | ||
$url = "https://172.16.2.44/commands.json"; | ||
$data = [ | ||
'Command' => [ | ||
'command_type' => 1, //Integer value (1,2,3) | ||
'name' => 'Command over API', | ||
'command_line' => '$USER1$/check_api', | ||
'description' => 'This command was created using the openITCOCKPIt API interface' | ||
] | ||
]; | ||
|
||
//If we use a post request, cake can do its macig, and runs the add method!! | ||
|
||
$response = \Httpful\Request::get($url) | ||
->withoutStrictSSL() | ||
->useProxy('http://proxy.master.dns', '8080') | ||
->body(json_encode($data)) | ||
->send(); | ||
print_r($response); | ||
} | ||
|
||
function login(){ | ||
$url = "https://172.16.2.44/login/login.json"; | ||
$data = [ | ||
'LoginUser' => [ | ||
'email' => '[email protected]', | ||
'password' => 'asdf12', | ||
'remember_me' => 0, | ||
] | ||
]; | ||
|
||
//If we use a post request, cake can do its macig, and runs the add method!! | ||
|
||
$response = \Httpful\Request::get($url) | ||
->withoutStrictSSL() | ||
->useProxy('http://proxy.master.dns', '8080') | ||
->body(json_encode($data)) | ||
->expectsJson() | ||
->send(); | ||
print_r($response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2012 Nate Good <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.