Fixes related with the oracle support
This commit is contained in:
parent
2322b07c77
commit
17c3de2b2f
|
@ -1169,9 +1169,9 @@ treport_custom_sql_insert(4, 'Group view','< (select count
|
|||
COMMIT;
|
||||
END;;
|
||||
|
||||
INSERT INTO trecon_script VALUES (2,'IPMI Recon','Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 <info@artica.es>

Usage: ./ipmi-recon.pl <task_id> <group_id> <create_incident_flag> <custom_field1> <custom_field2> <custom_field3>

* custom_field1 = Network i.e.: 192.168.100.0/24
* custom_field2 = Username
* custom_fiedl3 = Password','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.: 192.168.100.0/24\",\"value\":\"\",\hide\":\"\"},\"2\":{\macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"}}');
|
||||
INSERT INTO trecon_script VALUES (4,'SNMP L2 Recon','Pandora FMS SNMP Recon Plugin for level 2 network topology discovery.
(c) Artica ST 2014 <info@artica.es>

Usage:

   ./snmp-recon.pl <task_id> <group_id> <create_incident> <custom_field1> <custom_field2> [custom_field3] [custom_field4]

 * custom_field1 = comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)
 * custom_field2 = comma separated list of snmp communities to try.
 * custom_field3 = a router in the network. Optional but recommended.
 * custom_field4 = set to -a to add all network interfaces (by default only interfaces that are up are added).

 Additional information:
When the script is called from a recon task the task_id, group_id and create_incident parameters are automatically filled by the Pandora FMS Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"Comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Community\",\"help\":\"Comma separated list of snmp communities to try.\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Router\",\"help\":\"A router in the network. Optional but recommended.\",\"value\":\"\",\"hide\":\"\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Optional parameter\",\"help\":\"Set to -a to add all network interfaces (by default only interfaces that are up are added).\",\"value\":\"\",\"hide\":\"\"}}');
|
||||
INSERT INTO trecon_script VALUES (5,'WMI Recon Script','This script is used to automatically gather host information via WMI.
Available parameters:

* Network = network to scan (e.g. 192.168.100.0/24).
* WMI auth = comma separated list of WMI authentication tokens in the format username%password (e.g. Administrador%pass).

See the documentation for more information.','/usr/share/pandora_server/util/recon_scripts/wmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"WMI auth\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}');
|
||||
INSERT INTO trecon_script VALUES (2,'IPMI Recon','Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 <info@artica.es>

Usage: ./ipmi-recon.pl <task_id> <group_id> <create_incident_flag> <custom_field1> <custom_field2> <custom_field3>

* custom_field1 = Network i.e.: 192.168.100.0/24
* custom_field2 = Username
* custom_fiedl3 = Password','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{"1":{"macro":"_field1_","desc":"Network","help":"i.e.: 192.168.100.0/24","value":"","hide":""},"2":{"macro":"_field2_","desc":"Username","help":"","value":"","hide":""},"3":{"macro":"_field3_","desc":"Password","help":"","value":"","hide":"1"}}');
|
||||
INSERT INTO trecon_script VALUES (4,'SNMP L2 Recon','Pandora FMS SNMP Recon Plugin for level 2 network topology discovery.
(c) Artica ST 2014 <info@artica.es>

Usage:

   ./snmp-recon.pl <task_id> <group_id> <create_incident> <custom_field1> <custom_field2> [custom_field3] [custom_field4]

 * custom_field1 = comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)
 * custom_field2 = comma separated list of snmp communities to try.
 * custom_field3 = a router in the network. Optional but recommended.
 * custom_field4 = set to -a to add all network interfaces (by default only interfaces that are up are added).

 Additional information:
When the script is called from a recon task the task_id, group_id and create_incident parameters are automatically filled by the Pandora FMS Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl','{"1":{"macro":"_field1_","desc":"Network","help":"Comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)","value":"","hide":""},"2":{"macro":"_field2_","desc":"Community","help":"Comma separated list of snmp communities to try.","value":"","hide":""},"3":{"macro":"_field3_","desc":"Router","help":"A router in the network. Optional but recommended.","value":"","hide":""},"4":{"macro":"_field4_","desc":"Optional parameter","help":"Set to -a to add all network interfaces (by default only interfaces that are up are added).","value":"","hide":""}}');
|
||||
INSERT INTO trecon_script VALUES (5,'WMI Recon Script','This script is used to automatically gather host information via WMI.
Available parameters:

* Network = network to scan (e.g. 192.168.100.0/24).
* WMI auth = comma separated list of WMI authentication tokens in the format username%password (e.g. Administrador%pass).

See the documentation for more information.','/usr/share/pandora_server/util/recon_scripts/wmi-recon.pl','{"1":{"macro":"_field1_","desc":"Network","help":"","value":"","hide":""},"2":{"macro":"_field2_","desc":"WMI auth","help":"","value":"","hide":""}}');
|
||||
|
||||
INSERT INTO tplugin (id, name, description, max_timeout, execute, plugin_type, macros, parameters) VALUES (1,'IPMI Plugin','Plugin to get IPMI monitors from a IPMI Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl',0,'{1:{macro:"_field1_",desc:Target IP,help:"",value:""},2:{macro:"_field2_",desc:Username,help:"",value:""},3:{macro:"_field3_",desc:Password,help:"",value:""}}','-h _field1_-u _field2_-p _field3_');
|
||||
INSERT INTO tplugin (id, name, description, max_timeout, execute, plugin_type, macros, parameters) VALUES (2,'DNS Plugin','This plugin is used to check if a specific domain return a specific IP address, and to check how time (milisecs) takes the DNS to answer. Use IP address parameter to specify the IP of your domain. Use these custom parameters for the other parameters:

-d domain to check (for example pandorafms.com)
-s DNS Server to check  (for example 8.8.8.8)

Optional parameters:

-t Do a DNS time response check instead DNS resolve test

',15,'/usr/share/pandora_server/util/plugin/dns_plugin.sh',0,'{1:{macro:"_field1_",desc:Target IP,help:"",value:""},2:{macro:"_field2_",desc:Domain to check,help:For example pandorafms.com,value:""},3:{macro:"_field3_",desc:DNS Server to check,help:For example 8.8.8.8,value:""},4:{macro:"_field4_",desc:Optional parameters,help:"",value:""}}','-i _field1_ -d _field2_ -s _field3_ _field4_');
|
||||
|
|
|
@ -4317,7 +4317,7 @@ sub pandora_self_monitoring ($$) {
|
|||
WHERE token = 'db_maintance'
|
||||
AND NULLIF(value, '')::int > UNIX_TIMESTAMP() - 86400");
|
||||
}
|
||||
else if ($RDBMS eq 'oracle') {
|
||||
elsif ($RDBMS eq 'oracle') {
|
||||
$dbmaintance = get_db_value ($dbh,
|
||||
"SELECT COUNT(*)
|
||||
FROM tconfig
|
||||
|
|
|
@ -148,6 +148,11 @@ sub db_connect ($$$$$$) {
|
|||
# Set date format
|
||||
$dbh->do("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'");
|
||||
$dbh->do("ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,'");
|
||||
|
||||
# Configuration to avoid errors when working with CLOB columns
|
||||
$dbh->{'LongReadLen'} = 66000;
|
||||
$dbh->{'LongTruncOk'} = 1;
|
||||
|
||||
return $dbh;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue