Unverified Commit 240141d5 authored by Sébastien DAVOULT's avatar Sébastien DAVOULT Committed by GitHub
Browse files

Merge pull request #58 from EyesOfNetworkCommunity/monitoring_ged_gui

external ITSM Function
parents 03000259 af85f498
......@@ -130,3 +130,21 @@
AuthEonSessionCookies On
Require valid-user
</Directory>
<Directory ~ /srv/eyesofnetwork/eonweb/module/admin_itsm/uploaded_file/>
AuthType Basic
AuthName "Restricted"
AuthEonAuthoritative On
AuthEonMySQLSocket /var/lib/mysql/mysql.sock
AuthEonMySQLUsername eonweb
AuthEonMySQLPassword root66
AuthEonMySQLDB eonweb
AuthEonMySQLTableSID sessions,users,groupright
AuthEonMySQLFieldUID sessions.user_id
AuthEonMySQLTableSIDCondition "`sessions`.`session_id`=$session_id AND `sessions`.`user_id`=$user_id AND `users`.`user_id`=$user_id AND `users`.`user_name`=$user_name AND `users`.`group_id`=$group_id AND `groupright`.`group_id`=$group_id AND `groupright`.`tab_7`='1'"
AuthEonPageLogin /login.php
AuthEonSessionCookies On
Require valid-user
</Directory>
Summary: EyesOfNetwork Web Interface
Name: eonweb
Version: 5.3
Release: 3
Release: 4
Source: https://github.com/EyesOfNetworkCommunity/%{name}/archive/%{version}-%{release}.tar.gz
Group: Applications/System
License: GPL
......@@ -42,8 +42,18 @@ cp -afv %{buildroot}%{eonconfdir}/eonwebpurge %{buildroot}%{_sysconfdir}/cron.d/
cp -afv %{buildroot}%{eonconfdir}/eonweb.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/
%post
/bin/chmod 775 %{datadir}/cache
/bin/chown -R root:eyesofnetwork %{datadir}
case "$1" in
1)
# Initial install
/bin/chmod 775 %{datadir}/cache
/bin/chown -R root:eyesofnetwork %{datadir}
;;
2)
# Update EON 5.3.4
/usr/bin/mysql -u root --password=root66 eonweb < %{eonconfdir}/updates/5.3.4.sql
;;
esac
%clean
rm -rf %{buildroot}
......@@ -56,6 +66,10 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%changelog
* Thu Apr 09 2020 Sebastien DAVOULT <d@vou.lt> - 5.3-4.eon
- Add 5.3 Services in monitored service Management Processes
- Add ITSM Connector Function
* Fri Feb 28 2020 Sebastien DAVOULT <d@vou.lt> - 5.3-3.eon
- fix security issue #51 (SQL Inject by cookie)
......
......@@ -280,6 +280,134 @@ INSERT INTO `users` VALUES (1,1,'admin','21232f297a57a5a743894a0e4a801fc3','defa
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-- MySQL dump 10.14 Distrib 5.5.60-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: eonweb
-- ------------------------------------------------------
-- Server version 5.5.60-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `itsm_champ_ged`
--
DROP TABLE IF EXISTS `itsm_champ_ged`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_champ_ged` (
`champ_ged_id` int(11) NOT NULL AUTO_INCREMENT,
`champ_ged_name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`champ_ged_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_champ_ged`
--
--
-- Table structure for table `itsm`
--
DROP TABLE IF EXISTS `itsm`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm` (
`itsm_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_url` varchar(100) NOT NULL,
`itsm_file` varchar(100) DEFAULT NULL,
`itsm_ordre` int(11) DEFAULT NULL,
`itsm_parent` int(11) DEFAULT NULL,
`itsm_return_champ` varchar(25) DEFAULT NULL,
`itsm_type_request` varchar(5) DEFAULT NULL,
PRIMARY KEY (`itsm_id`),
KEY `parent_id_fk` (`itsm_parent`),
CONSTRAINT `parent_id_fk` FOREIGN KEY (`itsm_parent`) REFERENCES `itsm` (`itsm_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm`
--
--
-- Table structure for table `itsm_header`
--
DROP TABLE IF EXISTS `itsm_header`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_header` (
`itsm_header_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_id` int(11) DEFAULT NULL,
`header` varchar(100) DEFAULT NULL,
PRIMARY KEY (`itsm_header_id`),
KEY `url_id_fk` (`itsm_id`),
CONSTRAINT `url_id_fk` FOREIGN KEY (`itsm_id`) REFERENCES `itsm` (`itsm_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_header`
--
--
-- Table structure for table `itsm_var`
--
DROP TABLE IF EXISTS `itsm_var`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_var` (
`itsm_var_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_var_name` varchar(25) DEFAULT NULL,
`itsm_id` int(11) DEFAULT NULL,
`champ_ged_id` int(11) DEFAULT NULL,
PRIMARY KEY (`itsm_var_id`),
KEY `itsm_fk` (`itsm_id`),
KEY `champ_ged_fk` (`champ_ged_id`),
CONSTRAINT `champ_ged_fk` FOREIGN KEY (`champ_ged_id`) REFERENCES `itsm_champ_ged` (`champ_ged_id`) ON DELETE CASCADE,
CONSTRAINT `itsm_fk` FOREIGN KEY (`itsm_id`) REFERENCES `itsm` (`itsm_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_var`
--
LOCK TABLES `itsm_champ_ged` WRITE;
/*!40000 ALTER TABLE `itsm_champ_ged` DISABLE KEYS */;
INSERT INTO `itsm_champ_ged` VALUES (1,'comments'),(2,'description'),(3,'ip_address'),(4,'equipment'),(5,'service'),(6,'hostgroups'),(7,'servicegroups');
/*!40000 ALTER TABLE `itsm_champ_ged` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-09-06 9:56:25
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
......
-- MySQL dump 10.14 Distrib 5.5.60-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: eonweb
-- ------------------------------------------------------
-- Server version 5.5.60-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `itsm_champ_ged`
--
/*DROP TABLE IF EXISTS `itsm_champ_ged`;*/
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_champ_ged` (
`champ_ged_id` int(11) NOT NULL AUTO_INCREMENT,
`champ_ged_name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`champ_ged_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_champ_ged`
--
--
-- Table structure for table `itsm`
--
/*DROP TABLE IF EXISTS `itsm`;*/
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm` (
`itsm_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_url` varchar(100) NOT NULL,
`itsm_file` varchar(100) DEFAULT NULL,
`itsm_ordre` int(11) DEFAULT NULL,
`itsm_parent` int(11) DEFAULT NULL,
`itsm_return_champ` varchar(25) DEFAULT NULL,
`itsm_type_request` varchar(5) DEFAULT NULL,
PRIMARY KEY (`itsm_id`),
KEY `parent_id_fk` (`itsm_parent`),
CONSTRAINT `parent_id_fk` FOREIGN KEY (`itsm_parent`) REFERENCES `itsm` (`itsm_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm`
--
--
-- Table structure for table `itsm_header`
--
/*DROP TABLE IF EXISTS `itsm_header`;*/
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_header` (
`itsm_header_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_id` int(11) DEFAULT NULL,
`header` varchar(100) DEFAULT NULL,
PRIMARY KEY (`itsm_header_id`),
KEY `url_id_fk` (`itsm_id`),
CONSTRAINT `url_id_fk` FOREIGN KEY (`itsm_id`) REFERENCES `itsm` (`itsm_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_header`
--
--
-- Table structure for table `itsm_var`
--
/*DROP TABLE IF EXISTS `itsm_var`;*/
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itsm_var` (
`itsm_var_id` int(11) NOT NULL AUTO_INCREMENT,
`itsm_var_name` varchar(25) DEFAULT NULL,
`itsm_id` int(11) DEFAULT NULL,
`champ_ged_id` int(11) DEFAULT NULL,
PRIMARY KEY (`itsm_var_id`),
KEY `itsm_fk` (`itsm_id`),
KEY `champ_ged_fk` (`champ_ged_id`),
CONSTRAINT `champ_ged_fk` FOREIGN KEY (`champ_ged_id`) REFERENCES `itsm_champ_ged` (`champ_ged_id`) ON DELETE CASCADE,
CONSTRAINT `itsm_fk` FOREIGN KEY (`itsm_id`) REFERENCES `itsm` (`itsm_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `itsm_var`
--
LOCK TABLES `itsm_champ_ged` WRITE;
/*!40000 ALTER TABLE `itsm_champ_ged` DISABLE KEYS */;
INSERT INTO `itsm_champ_ged` VALUES (1,'comments'),(2,'description'),(3,'ip_address'),(4,'equipment'),(5,'service'),(6,'hostgroups'),(7,'servicegroups');
/*!40000 ALTER TABLE `itsm_champ_ged` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-09-06 9:56:25
......@@ -116,6 +116,12 @@ $array_action_option = array(
4 => "action.ack",
);
$array_action_itsm = array(
0 => "action.details",
4 => "action.ack",
6 => "label.admin_itsm.ged_btn_create",
);
$array_resolve_action_option = array(
0 => "action.details",
5 => "action.delete",
......
<?php
/*
#########################################
#
# Copyright (C) 2017 EyesOfNetwork Team
# DEV NAME : Jean-Philippe LEVY
# VERSION : 5.2
# APPLICATION : eonweb for eyesofnetwork project
#
# LICENCE :
# 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; either version 2
# of the License, or (at your option) any later version.
# 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.
#
#########################################
*/
/**
* Actions class for all eonweb's pages
*/
class CustomActions
{
/**
* Ged Acknowledge
*/
public function ged_acknowledge($selected_events, $queue)
{
global $array_ged_queues;
$result=false;
$status_itsm = get_config_var("itsm");
//error_log("Custom.Action.class.php : ".$status_itsm."\n", 3 , "/srv/eyesofnetwork/eonweb/module/admin_itsm/uploaded_file/log");
if(!in_array($queue,$array_ged_queues)) { $queue=$array_ged_queues[0]; }
if(isset($status_itsm) && $status_itsm == "on"){
foreach ($selected_events as $value) {
$value_parts = explode(":", $value);
$id_ged = $value_parts[0];
$ged_type = $value_parts[1];
if($ged_type == "nagios"){ $ged_type_nbr = 1; }
if($ged_type == "snmptrap"){ $ged_type_nbr = 2; }
/* // DU CAS PART CAS
$array_vars=array();
if(isset($group)) {
$array_vars["%GROUP%"]=$group;
}
*/
$result = report_itsm($ged_type, $queue, $id_ged);
if($result){
message(6,"Ticket created.","ok");
}else{
message(11,"An error occured during the ticket creation.","warning");
}
}
return true;
}else false;
}
/**
* Ged Edit
*/
public function ged_edit($selected_events, $queue, $comments)
{
return true;
}
/**
* Ged Own
*/
public function ged_own($selected_events, $queue, $global_action)
{
return true;
}
}
?>
......@@ -295,6 +295,11 @@
"name":"menu.link.logs",
"url":"/module/admin_logs/",
"target":"main"
},
{
"name":"menu.link.itsm",
"url":"/module/admin_itsm/",
"target":"main"
}
]
},
......
......@@ -58,6 +58,8 @@
"label._lang": "fr-FR",
"label.a_time": "Acknowledge time",
"label.ack_time": "Temps de reconnaissance",
"label.ack_in_nagios": "Acquittement thruk",
"label.ack_in_nagios_default": "Acquittement thruk par default",
"label.act_event": "Evènements actifs",
"label.add_comment": "Ajouter un commentaire",
"label.admin_auth.auth_backend": "Authentification Backend",
......@@ -163,6 +165,28 @@
"label.admin_notifier.title": "Notifications avancées",
"label.admin_notifier.rules.track": "Suivi",
"label.admin_process.title": "Gestion des processus",
"label.admin_itsm.title":"ITSM",
"label.admin_itsm.description" : "Outils permettant la gestion des applications de gestion de ticket comme GLPI, Mantis au travers d'evènements GED.",
"label.admin_itsm.on":"Activé",
"label.admin_itsm.off":"Desactivé",
"label.admin_itsm.ged_btn_create":"Déclarer un incident",
"label.admin_itsm.file" : "Fichier",
"label.admin_itsm.warn" : "Attention",
"label.admin_itsm.order":"Ordre",
"label.admin_itsm.warn_text" : "Si vous avez sélectionné ces options, vous risquez de créer une sur-création de ticket.",
"label.admin_itsm.ack_thruk" : "Si vous avez sélectionné cette option, l'acquittement des evènements actif via GED acquittera également dans thruk",
"label.admin_itsm.itsm_setting" :"Configuration itsm",
"label.admin_itsm.url":"Adresse",
"label.admin_itsm.type_request":"Type de requête",
"label.admin_itsm.token_user":"Token utilisateur",
"label.admin_itsm.token_app":"Token applicatif",
"label.admin_itsm.header":"En-têtes",
"label.admin_itsm.parent":"Valeur parent",
"label.admin_itsm.btn_generate":"Generer",
"label.admin_itsm.return_val":"Champs de retour",
"label.admin_itsm.var":"Variables",
"label.admin_itsm.acquit":"Acquittement automatique",
"label.admin_itsm.create":"Création automatique",
"label.admin_user.ldap_log": "Login LDAP",
"label.admin_user.select": "Sélectionner",
"label.admin_user.select_add": "Ajouter utilisateur",
......@@ -453,6 +477,7 @@
"menu.link.technical_table": "Tableau technique",
"menu.link.thruk": "Thruk",
"menu.link.thrukbp": "ThrukBP",
"menu.link.itsm": "ITSM",
"menu.link.tools": "Outils",
"menu.link.trends": "Tendances",
"menu.link.users": "Utilisateurs",
......
......@@ -58,6 +58,8 @@
"label._lang": "en-US",
"label.a_time": "Acknowledge time",
"label.ack_time": "Acknowledge time",
"label.ack_in_nagios": "Acknowledge thruk",
"label.ack_in_nagios_default": "Acknowledge thruk by default",
"label.act_event": "Active events",
"label.add_comment": "Add comment",
"label.admin_auth.auth_backend": "Authentification Backend",
......@@ -163,6 +165,28 @@
"label.admin_notifier.title": "Advanced Notifications",
"label.admin_notifier.rules.track": "Tracking",
"label.admin_process.title": "Process management",
"label.admin_itsm.title": "ITSM",
"label.admin_itsm.description" : "Tools to manage ticket management applications like GLPI, Mantis through GED events.",
"label.admin_itsm.on": "On",
"label.admin_itsm.off": "Off",
"label.admin_itsm.ged_btn_create": "Report an incident",
"label.admin_itsm.file" : "File",
"label.admin_itsm.warn" : "Warning",
"label.admin_itsm.order":"Order",
"label.admin_itsm.warn_text" : "If you selected those options you may cause an over creation of ticket.",
"label.admin_itsm.ack_thruk" : "If you selected this option, acknowledging active event in GED lead to acknowledge in thruk",
"label.admin_itsm.itsm_setting" :"Itsm configuration",
"label.admin_itsm.url":"Address",
"label.admin_itsm.type_request":"Request type",
"label.admin_itsm.token_user":"User Token",
"label.admin_itsm.token_app":"App Token",
"label.admin_itsm.header":"Headers",
"label.admin_itsm.parent":"Parent value",
"label.admin_itsm.return_val":"Return fields",
"label.admin_itsm.btn_generate":"Generate",
"label.admin_itsm.var":"Variables",
"label.admin_itsm.acquit":"Automatic acquitement",
"label.admin_itsm.create":"Automatic creation",
"label.admin_user.ldap_log": "LDAP login",
"label.admin_user.select": "Select",
"label.admin_user.select_add": "Add user",
......@@ -453,6 +477,7 @@
"menu.link.technical_table": "Technical table",
"menu.link.thruk": "Thruk",
"menu.link.thrukbp": "ThrukBP",
"menu.link.itsm": "ITSM",
"menu.link.tools": "Tools",
"menu.link.trends": "Trends",
"menu.link.users": "Users",
......
......@@ -251,7 +251,9 @@ else {
logging("login","User logged in",$login);
echo "<meta http-equiv='Refresh' content='0;URL=".getDefaultPage($usrlimit)."' />";
}
else { display_login(); }
else { display_login();
logging("login","User failed to login",$login);
}
}
else { display_login(); }
}
......
# Module admin_itsm
## <version 1.0>
Module for eonweb
This module have been created to manage a connexion with an external itsm tool (like glpi, mantis ... ).
This module take different informations to call the api of your ticket application.
A graphic interface to manage the configuration have been created and the interface of monitoring_ged had been modified to manage those new functionnalities.
Requirements
------------
Eyes of Network 5.3
Installation
------------
To use this module you need to have the latest version of eonweb that used all the modification given to the module monitoring_ged, included files and admin_itsm. Moreover to used all the functionality of this tool you have to modified if necessary to automatize the creation of ticket, `/srv/eyesofnetwork/ged/scripts/ged-nagios-host` and `/srv/eyesofnetwork/ged/scripts/ged-nagios-service` and add this line :
``` shell
#Call script to handle itsm auto-management
php /srv/eyesofnetwork/eonweb/module/admin_itsm/scripts/get-nagios.php
```
The database have seen some changes to be able to handle the admin itsm module. This file `itsm.sql` will do the proper change.
Configuration
-------------
The configuration depends of the itsm you used. Most of those tools needs a json or xml file to be send through an api request, those files could be upload and modify with value whitch will be change by value before the request is executed. This exemple bellow will help you to create yours.
``` json
{
"input": {
"id": "%PREVIOUS%",
"group": "",
"type": "2",
"status": "6"
}
}
```
Moreover most of api's request require to get a token first to then proceed other action.
To do this, this tool can use queries run in succession and can, thanks to reused variables, get the result from previous queries and so-called "parent" queries. (The parent request will allow for example to retrieve the TOKEN and be reused in all the following requests while the request
the requests that precede an other request allow the transfert of its result to one another). An exemple is for requests where one must recover at first a token then an id and finally create a ticket. It will be necessary then to use a parent request which will make it possible to recover %PARENT_VALUE% (that can be the token to securise request to the api), then a request to recover the id (of a group for example) that will be injected directly into the following creation request through a predefined variable %PREVIOUS%.
<!-- graph LR
request_get_token \-\->|%PARENT_VALUE% contains the response|request_get_id & request_create_ticket & request_change_author
request_get_id \-\->|%PREVIOUS% contains the response|request_create_ticket
request_create_ticket \-\->|%PREVIOUS% contains for exemple the id of the newly ticket|request_change_author -->
[![](https://mermaid.ink/img/eyJjb2RlIjoiZ3JhcGggTFJcbiAgIHJlcXVlc3RfZ2V0X3Rva2VuIC0tPnwlUEFSRU5UX1ZBTFVFJSBjb250YWlucyB0aGUgcmVzcG9uc2V8cmVxdWVzdF9nZXRfaWQgJiByZXF1ZXN0X2NyZWF0ZV90aWNrZXQgJiByZXF1ZXN0X2NoYW5nZV9hdXRob3JcbiAgIHJlcXVlc3RfZ2V0X2lkIC0tPnwlUFJFVklPVVMlIGNvbnRhaW5zIHRoZSByZXNwb25zZXxyZXF1ZXN0X2NyZWF0ZV90aWNrZXRcbiAgIHJlcXVlc3RfY3JlYXRlX3RpY2tldCAtLT58JVBSRVZJT1VTJSBjb250YWlucyBmb3IgZXhlbXBsZSB0aGUgaWQgb2YgdGhlIG5ld2x5IHRpY2tldHxyZXF1ZXN0X2NoYW5nZV9hdXRob3Jcblx0XHQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggTFJcbiAgIHJlcXVlc3RfZ2V0X3Rva2VuIC0tPnwlUEFSRU5UX1ZBTFVFJSBjb250YWlucyB0aGUgcmVzcG9uc2V8cmVxdWVzdF9nZXRfaWQgJiByZXF1ZXN0X2NyZWF0ZV90aWNrZXQgJiByZXF1ZXN0X2NoYW5nZV9hdXRob3JcbiAgIHJlcXVlc3RfZ2V0X2lkIC0tPnwlUFJFVklPVVMlIGNvbnRhaW5zIHRoZSByZXNwb25zZXxyZXF1ZXN0X2NyZWF0ZV90aWNrZXRcbiAgIHJlcXVlc3RfY3JlYXRlX3RpY2tldCAtLT58JVBSRVZJT1VTJSBjb250YWlucyBmb3IgZXhlbXBsZSB0aGUgaWQgb2YgdGhlIG5ld2x5IHRpY2tldHxyZXF1ZXN0X2NoYW5nZV9hdXRob3Jcblx0XHQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)
Author Information
------------------
* **Jérémy HOARAU** - <jeremy.hoarau@axians.com> - [EyesOfNetwork Community](https://github.com/eyesofnetworkcommunity)
/*
#########################################
#
# Copyright (C) 2019 EyesOfNetwork Team
# DEV NAME : Jeremy HOARAU
# VERSION : 5.2
# APPLICATION : eonweb for eyesofnetwork project
#
# LICENCE :
# 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; either version 2