Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
41
11.04.2011, 21:24
![]() |
MySQL-Abfrage(n) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
SQL> SET SERVEROUTPUT ON SQL> SET SERVEROUTPUT ON 20000 SP2-0158: unknown SET option "20000" SQL> SET SERVEROUTPUT 20000 SP2-0265: serveroutput must be set ON or OFF SQL> BEGIN clean_table_by_instance('host_parenthosts', 1); clean_table_by_instance('host_contacts', 1); clean_table_by_instance('host_groups', 1); END; 2 3 4 5 6 / Line:DELETE FROM host_parenthosts WHERE instance_id=1 Line:DELETE FROM host_contacts WHERE instance_id=1 Line:DELETE FROM host_groups WHERE instance_id=1 BEGIN * ERROR at line 1: ORA-00942: table or view does not exist ORA-06512: at "ICINGA.CLEAN_TABLE_BY_INSTANCE", line 11 ORA-06512: at line 4 |
![]() |
MySQL-Abfrage(n) |
1 2 3 4 5 6 7 8 9 10 11 |
SQL> BEGIN clean_table_by_instance('HOST_PARENTHOSTS', 1); clean_table_by_instance('HOST_CONTACTS', 1); clean_table_by_instance('HOSTGROUPS', 1); END; / 2 3 4 5 6 Line:DELETE FROM HOST_PARENTHOSTS WHERE instance_id=1 Line:DELETE FROM HOST_CONTACTS WHERE instance_id=1 Line:DELETE FROM HOSTGROUPS WHERE instance_id=1 PL/SQL procedure successfully completed. |
Beiträge: 106
Geschlecht: Männlich
Beruf: Oracle DBA
Anzahl Nagios-Server: 2
Nagios-Version(en): 1.3
Icinga-Version(en): 1.3.0
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 14
Anzahl Services: 33
Betriebssystem(e): CentOS5.5,Windows,Solaris10 Sparc
Plugin-Version(en): 1.4.15
IDO-Version: 1.3.0
Sonstige Addon's: pnp4nagios0.6.11,icinga-web,ido2db auf Oracle
42
12.04.2011, 11:33
Zitat
Den Parameter für die Länge des Server-Outputs gibt's in der XE nicht
![]() |
MySQL-Abfrage(n) |
1 |
set serveroutput on size 20000 |
Zitat
Ich habe mir die Datenbank mal über die APEX angeschaut, dort gibt es diese Tabellen - allerdings in uppercase. Habe mal deinen Befehl auf Uppercase-Namen hin modifiziert und siehe da:
![]() |
MySQL-Abfrage(n) |
1 |
DELETE FROM host_parenthosts WHERE instance_id=1; |
![]() |
MySQL-Abfrage(n) |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
create or replace PROCEDURE clean_table_by_instance (p_table_name IN varchar2, p_id IN number ) IS v_stmt_str varchar2(200); BEGIN v_stmt_str := 'DELETE FROM ' || upper(p_table_name) || ' WHERE instance_id=' || p_id; dbms_output.put_line('Line:'||v_stmt_str); EXECUTE IMMEDIATE v_stmt_str; END; / |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tommi« (12.04.2011, 11:45)
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
43
12.04.2011, 22:41
Zitat von »Tommi«
Tabellennamen sind bei Oracle immer caseinsensitiv und werden als Grossbuchstaben angezeigt, wenn sie ohne Anführungszeichen angelegt werden. Was anderes
habe ich in den ganzen Jahren mit Oracle noch nicht erlebt. Sehr merkwürdig.
Zitat von »Tommi«
DELETE FROM host_parenthosts WHERE instance_id=1;
![]() |
MySQL-Abfrage(n) |
1 2 3 |
SQL> DELETE FROM host_parenthosts WHERE instance_id=1; 0 rows deleted. |
Zitat von »Tommi«
Übergangsweise kann man das so lösen:
![]() |
MySQL-Abfrage(n) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
SQL> create or replace PROCEDURE clean_table_by_instance 2 (p_table_name IN varchar2, p_id IN number ) IS v_stmt_str varchar2(200); 3 4 5 BEGIN v_stmt_str := 'DELETE FROM ' 6 7 || upper(p_table_name) || ' WHERE instance_id=' || p_id; dbms_output.put_line('Line:'||v_stmt_str); EXECUTE IMMEDIATE v_stmt_str; END; / 8 9 10 11 12 13 Procedure created. SQL> BEGIN clean_table_by_instance('HOST_PARENTHOSTS', 1); clean_table_by_instance('HOST_CONTACTS', 1); clean_table_by_instance('HOSTGROUPS', 1); END; 2 3 4 5 6 7 / Line:DELETE FROM HOST_PARENTHOSTS WHERE instance_id=1 Line:DELETE FROM HOST_CONTACTS WHERE instance_id=1 Line:DELETE FROM HOSTGROUPS WHERE instance_id=1 PL/SQL procedure successfully completed. |
![]() |
Quellcode |
1 2 3 4 5 6 7 8 |
[1302641229.519953] [001.2] [pid=3773] ido2db_db_clear_table() start [1302641229.520001] [001.2] [pid=3773] ido2db_db_clear_table()Parameter Table 'customvariablestatus' Len 20 ID: 1 [1302641229.570114] [001.2] [pid=3773] ERROR: QUERY 'BEGIN clean_table_by_instance(:X1, :X2); END;' [1302641229.628764] [001.2] [pid=3773] ERROR: MSG 'ORA-00911: invalid character ORA-06512: at "ICINGA.CLEAN_TABLE_BY_INSTANCE", line 11 ORA-06512: at line 1 ' [1302641229.628896] [001.2] [pid=3773] ido2db_query_instances_delete() execute error |
Beiträge: 106
Geschlecht: Männlich
Beruf: Oracle DBA
Anzahl Nagios-Server: 2
Nagios-Version(en): 1.3
Icinga-Version(en): 1.3.0
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 14
Anzahl Services: 33
Betriebssystem(e): CentOS5.5,Windows,Solaris10 Sparc
Plugin-Version(en): 1.4.15
IDO-Version: 1.3.0
Sonstige Addon's: pnp4nagios0.6.11,icinga-web,ido2db auf Oracle
44
13.04.2011, 14:26
![]() |
MySQL-Abfrage(n) |
1 2 3 4 5 |
BEGIN clean_table_by_instance('HOST_PARENTHOSTS', 1); clean_table_by_instance('HOST_CONTACTS', 1); clean_table_by_instance('HOSTGROUPS', 1); END; |
![]() |
MySQL-Abfrage(n) |
1 2 3 |
ido2db_db_clear_table()Parameter Table 'customvariablestatus' ERROR: MSG 'ORA-00911: invalid character ORA-06512: at "ICINGA.CLEAN_TABLE_BY_INSTANCE", line 11 |
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
45
14.04.2011, 14:01
![]() |
Quellcode |
1 |
./configure --with-oracle-headers-path=/usr/src/instantclient_10_1/sdk/include --with-oracle-lib-path=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib |
Beiträge: 106
Geschlecht: Männlich
Beruf: Oracle DBA
Anzahl Nagios-Server: 2
Nagios-Version(en): 1.3
Icinga-Version(en): 1.3.0
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 14
Anzahl Services: 33
Betriebssystem(e): CentOS5.5,Windows,Solaris10 Sparc
Plugin-Version(en): 1.4.15
IDO-Version: 1.3.0
Sonstige Addon's: pnp4nagios0.6.11,icinga-web,ido2db auf Oracle
46
14.04.2011, 15:47
Zitat
--with-oracle-headers-path=/usr/src/instantclient_10_1/sdk/include
--with-oracle-lib-path=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
Zitat
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
./configure
Zitat
export ORACLE_HOME=/usr/src/instantclient_10_1/
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME:$PATH
./configure --with-oracle-headers-path=/usr/src/instantclient_10_1/sdk/include --with-oracle-lib-path=/usr/src/instantclient_10_1/
Beiträge: 2 188
Geburtstag: 30.05.1983 (28)
Geschlecht: Männlich
Wohnort: Wien
Beruf: DNS & Monitoring Developer
Anzahl Nagios-Server: 3x Icinga prod, 2x test/dev
Nagios-Version(en): s/nagios/icinga/
Icinga-Version(en): 1.4.0 / GIT
Verteiltes Monitoring: Ja
Redundantes Monitoring: Ja
Anzahl-Hosts: 1000+
Anzahl Services: 15000+
Betriebssystem(e): RHEL 5.6 x64
Plugin-Version(en): 1.4.15
IDO-Version: 1.4.0 / GIT MySQL/Postgresql/Oracle
Sonstige Addon's: PNP 0.6.11, check_mk GIT
47
15.04.2011, 15:43
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
48
18.04.2011, 13:37
![]() |
Quellcode |
1 2 |
Apr 18 22:38:14 tvm-icingaex ido2db: ERROR: QUERY 'MERGE INTO contactgroup_members USING DUAL ON (contactgroup_id=:X2 AND contact_object_id=:X3) WHEN MATCHED THEN UPDATE SET instance_id=:X1 WHEN NOT MATCHED THEN INSERT (id, instance_id, contactgroup_id, contact_object_id) VALUES (seq_contactgroup_members.nextval, :X1, :X2, :X3)' Apr 18 22:38:14 tvm-icingaex ido2db: ERROR: MSG 'ORA-00911: Ungültiges Zeichen ' |
![]() |
Quellcode |
1 2 3 4 |
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH ./configure |
Beiträge: 106
Geschlecht: Männlich
Beruf: Oracle DBA
Anzahl Nagios-Server: 2
Nagios-Version(en): 1.3
Icinga-Version(en): 1.3.0
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 14
Anzahl Services: 33
Betriebssystem(e): CentOS5.5,Windows,Solaris10 Sparc
Plugin-Version(en): 1.4.15
IDO-Version: 1.3.0
Sonstige Addon's: pnp4nagios0.6.11,icinga-web,ido2db auf Oracle
49
18.04.2011, 21:18
Zitat
unglaublich - schon wieder der selbe Fehler:
Zitat
Kompiliert habe ich das ganze jetzt wie folgt:
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
50
19.04.2011, 07:51
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3
51
19.04.2011, 13:28
![]() |
Quellcode |
1 2 3 4 5 6 |
Apr 19 22:24:39 HOST ido2db: Client connected, data available. Apr 19 22:24:39 HOST icinga: idomod: Successfully reconnected to data sink! 0 items lost, 11 queued items to flush. Apr 19 22:24:39 HOST icinga: idomod: Successfully flushed 11 queued items to data sink. Apr 19 22:24:39 HOST ido2db: Handling client connection... Apr 19 22:24:41 HOST icinga: idomod: Error writing to data sink! Some output may get lost... Apr 19 22:24:41 HOST icinga: idomod: Please check remote ido2db log, database connection or SSL Parameters |
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
log_file=/usr/local/icinga/var/icinga.log cfg_file=/usr/local/icinga/etc/objects/commands.cfg cfg_file=/usr/local/icinga/etc/objects/contacts.cfg cfg_file=/usr/local/icinga/etc/objects/timeperiods.cfg cfg_file=/usr/local/icinga/etc/objects/templates.cfg cfg_file=/usr/local/icinga/etc/objects/localhost.cfg object_cache_file=/usr/local/icinga/var/objects.cache precached_object_file=/usr/local/icinga/var/objects.precache resource_file=/usr/local/icinga/etc/resource.cfg status_file=/usr/local/icinga/var/status.dat status_update_interval=10 icinga_user=icinga icinga_group=icinga check_external_commands=1 command_check_interval=-1 command_file=/usr/local/icinga/var/rw/icinga.cmd external_command_buffer_slots=4096 lock_file=/usr/local/icinga/var/icinga.lock temp_file=/usr/local/icinga/var/icinga.tmp temp_path=/tmp event_broker_options=-1 broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg log_rotation_method=d log_archive_path=/usr/local/icinga/var/archives use_daemon_log=1 use_syslog=1 use_syslog_local_facility=0 syslog_local_facility=5 log_notifications=1 log_service_retries=1 log_host_retries=1 log_event_handlers=1 log_initial_states=0 log_current_states=1 log_external_commands=1 log_passive_checks=1 log_external_commands_user=0 log_long_plugin_output=0 service_inter_check_delay_method=s max_service_check_spread=30 service_interleave_factor=s host_inter_check_delay_method=s max_host_check_spread=30 max_concurrent_checks=0 check_result_reaper_frequency=10 max_check_result_reaper_time=30 check_result_path=/usr/local/icinga/var/spool/checkresults max_check_result_file_age=3600 cached_host_check_horizon=15 cached_service_check_horizon=15 enable_predictive_host_dependency_checks=1 enable_predictive_service_dependency_checks=1 soft_state_dependencies=0 auto_reschedule_checks=0 auto_rescheduling_interval=30 auto_rescheduling_window=180 sleep_time=0.25 service_check_timeout=60 host_check_timeout=30 event_handler_timeout=30 notification_timeout=30 ocsp_timeout=5 perfdata_timeout=5 retain_state_information=1 state_retention_file=/usr/local/icinga/var/retention.dat retention_update_interval=60 use_retained_program_state=1 use_retained_scheduling_info=1 retained_host_attribute_mask=0 retained_service_attribute_mask=0 retained_process_host_attribute_mask=0 retained_process_service_attribute_mask=0 retained_contact_host_attribute_mask=0 retained_contact_service_attribute_mask=0 interval_length=60 use_aggressive_host_checking=0 execute_service_checks=1 accept_passive_service_checks=1 execute_host_checks=1 accept_passive_host_checks=1 enable_notifications=1 enable_event_handlers=1 process_performance_data=0 obsess_over_services=0 obsess_over_hosts=0 translate_passive_host_checks=0 passive_host_checks_are_soft=0 check_for_orphaned_services=1 check_for_orphaned_hosts=1 service_check_timeout_state=u check_service_freshness=1 service_freshness_check_interval=60 check_host_freshness=0 host_freshness_check_interval=60 additional_freshness_latency=15 enable_flap_detection=1 low_service_flap_threshold=5.0 high_service_flap_threshold=20.0 low_host_flap_threshold=5.0 high_host_flap_threshold=20.0 date_format=us p1_file=/usr/local/icinga/bin/p1.pl enable_embedded_perl=1 use_embedded_perl_implicitly=1 stalking_event_handlers_for_hosts=0 stalking_event_handlers_for_services=0 illegal_object_name_chars=`~!$%^&*|'"<>?,()= illegal_macro_output_chars=`~$&|'"<> use_regexp_matching=0 use_true_regexp_matching=0 admin_email=icinga admin_pager=pageicinga daemon_dumps_core=0 use_large_installation_tweaks=0 enable_environment_macros=1 debug_level=-1 debug_verbosity=2 debug_file=/usr/local/icinga/var/icinga.debug max_debug_file_size=1000000 event_profiling_enabled=0 |
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
lock_file=/usr/local/icinga/var/ido2db.lock ido2db_user=icinga ido2db_group=icinga socket_type=tcp tcp_port=5668 use_ssl=0 db_servertype=oracle db_host=localhost db_port=1521 db_name=//localhost/XE db_prefix=icinga_ db_user=icinga db_pass=PASSWORT max_timedevents_age=60 max_systemcommands_age=1440 max_servicechecks_age=1440 max_hostchecks_age=1440 max_eventhandlers_age=10080 max_externalcommands_age=10080 max_logentries_age=44640 max_acknowledgements_age=44640 clean_realtime_tables_on_core_startup=1 clean_config_tables_on_core_startup=1 trim_db_interval=60 housekeeping_thread_startup_delay=60 debug_level=-1 debug_verbosity=2 debug_file=/usr/local/icinga/var/ido2db.debug max_debug_file_size=1000000 oci_errors_to_syslog=1 |
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
instance_name=default output_type=tcpsocket output=127.0.0.1 tcp_port=5668 use_ssl=0 output_buffer_items=5000 buffer_file=/usr/local/icinga/var/idomod.tmp file_rotation_interval=14400 file_rotation_timeout=60 reconnect_interval=15 reconnect_warning_interval=15 data_processing_options=67108861 config_output_options=2 debug_level=-1 debug_verbosity=2 debug_file=/usr/local/icinga/var/idomod.debug max_debug_file_size=1000000 |
Beiträge: 106
Geschlecht: Männlich
Beruf: Oracle DBA
Anzahl Nagios-Server: 2
Nagios-Version(en): 1.3
Icinga-Version(en): 1.3.0
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 14
Anzahl Services: 33
Betriebssystem(e): CentOS5.5,Windows,Solaris10 Sparc
Plugin-Version(en): 1.4.15
IDO-Version: 1.3.0
Sonstige Addon's: pnp4nagios0.6.11,icinga-web,ido2db auf Oracle
52
22.04.2011, 09:12
Zitat
Installationen mit CentOS und Oracle XE
Zitat
Error writing to data sink! Some output may get lost...
Zitat
idomod: Successfully reconnected to data sink! 0 items lost, 11 queued items to flush
Zitat
Muss man erst einstellen, dass Icinga die Results in die DB schreibt?
Zitat
Icinga.cfg:
event_broker_options=-1
broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg
idomod.cfg
data_processing_options=67108861
config_output_options=2
Anfänger
Beiträge: 31
Anzahl Nagios-Server: 2
Nagios-Version(en): -
Icinga-Version(en): 1.3
Verteiltes Monitoring: Nein
Redundantes Monitoring: Nein
Anzahl-Hosts: 10
Anzahl Services: 10
Betriebssystem(e): Linux, Windows
Plugin-Version(en): -
NDO-Version: -
IDO-Version: 1.3