Quantcast
Channel: Monitoring-Portal Feed
Viewing all 1338 articles
Browse latest View live

[Solved] Problem with ido-psql HA feature: Duplicate entries in DB tables

$
0
0
Hi!

I have a icinga v2.4.1 ha cluster with a master zone and two endpoints in it. There is a single, central postgreSQL database on a separate db server.

Since I have enable_ha = true in IdoPgsqlConnection, I would expect that only one of the two endpoints writes to the db - however I see duplicate entries in the database tables.

To better trace the problem, I removed all object definitions and startet over with only two hosts "apc1" and "apc3" (no other hosts or object types).

Result:

Quellcode

1
2
3
4
5
6
7
8
select * from icinga_hosts  order by alias;

host_id          	instance_id      	config_type host_object_id   	alias      	
------------------- -------------------- ----------- -------------------- ---------------  ...
                	1                	1       	117              	apc1       	...
                	2                	1       	120              	apc1       	...
                	1                	1       	118              	apc3       	...
                	2                	1       	119              	apc3       	...


In the web 2 interface:



Files in /etc/icinga2 on icinga2a (config master):

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
├── conf.d
├── constants.conf
├── constants.conf.orig
├── features-available
│   ├── api.conf
│   ├── api.conf.orig
│   ├── checker.conf
│   ├── command.conf
│   ├── compatlog.conf
│   ├── debuglog.conf
│   ├── gelf.conf
│   ├── graphite.conf
│   ├── icingastatus.conf
│   ├── ido-pgsql.conf
│   ├── livestatus.conf
│   ├── mainlog.conf
│   ├── notification.conf
│   ├── opentsdb.conf
│   ├── perfdata.conf
│   ├── statusdata.conf
│   └── syslog.conf
├── features-enabled
│   ├── api.conf -> ../features-available/api.conf
│   ├── checker.conf -> ../features-available/checker.conf
│   ├── command.conf -> ../features-available/command.conf
│   ├── compatlog.conf -> ../features-available/compatlog.conf
│   ├── ido-pgsql.conf -> ../features-available/ido-pgsql.conf
│   ├── mainlog.conf -> ../features-available/mainlog.conf
│   ├── notification.conf -> ../features-available/notification.conf
│   └── statusdata.conf -> ../features-available/statusdata.conf
├── icinga2.conf
├── init.conf
├── local
├── pki
│   ├── ca.crt
│   ├── icinga2a.crt
│   ├── icinga2a.csr
│   └── icinga2a.key
├── repository.d
│   └── README
├── scripts
│   ├── mail-host-notification.sh
│   └── mail-service-notification.sh
├── zones.conf
├── zones.conf.orig
└── zones.d
	├── dmz
	├── global-templates
	├── master
	│   └── hosts.conf
	└── README


Files in /etc/icinga2 on icinga2b:

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
.
├── conf.d
├── constants.conf
├── constants.conf.orig
├── features-available
│   ├── api.conf
│   ├── api.conf.orig
│   ├── checker.conf
│   ├── command.conf
│   ├── compatlog.conf
│   ├── debuglog.conf
│   ├── gelf.conf
│   ├── graphite.conf
│   ├── icingastatus.conf
│   ├── ido-pgsql.conf
│   ├── livestatus.conf
│   ├── mainlog.conf
│   ├── notification.conf
│   ├── opentsdb.conf
│   ├── perfdata.conf
│   ├── statusdata.conf
│   └── syslog.conf
├── features-enabled
│   ├── api.conf -> ../features-available/api.conf
│   ├── checker.conf -> ../features-available/checker.conf
│   ├── command.conf -> ../features-available/command.conf
│   ├── compatlog.conf -> ../features-available/compatlog.conf
│   ├── ido-pgsql.conf -> ../features-available/ido-pgsql.conf
│   ├── mainlog.conf -> ../features-available/mainlog.conf
│   └── statusdata.conf -> ../features-available/statusdata.conf
├── icinga2.conf
├── init.conf
├── local
├── pki
│   ├── ca.crt
│   ├── icinga2b.crt
│   ├── icinga2b.crt.orig
│   └── icinga2b.key
├── repository.d
│   └── README
├── scripts
│   ├── mail-host-notification.sh
│   └── mail-service-notification.sh
├── zones.conf
├── zones.conf.orig
└── zones.d
	└── README


... continued in next post...

Nagios Anzahl Notify Mails auf eine einzige beschränken

$
0
0
Hi,
wie kann ich die Anzahl der E-Mail Warnungen verändern?
Irgendwann bin ich mal auf die Option gestossen, bei der man den ersten negativen Check beispielsweise an den Admin schickt und dann erst den fünften an die Kontaktgruppe Chef.
Dies lies sich mit den Optionen "first_notification" und "last_notification" bewerkstelligen.
Mir würde schon die Option reichen, Warnungen nur ein mal zu verschicken.
Super wäre ein Tutorial für NConf, aber auch über die händische Einpflegeoption wäre ich schon sehr froh.
Netten Gruss
ops

Error when generate config file by CLAPI

$
0
0
Hello everybody,



In my organisation we have :

Centreon 2.7, Centos 6.7 et centengine 1.5



I made a synchro-script between my Vcenter and my Centreon.

My script work but i have to generate config file and restart the poller with my bear hands. That's not what i want.



That's why i wanted to use CLAPI APPLYCFG command at the end of the script. But when i run this command this error occure :





PHP Warning:
require(../../../include/configuration/configGenerate/genCGICFG.php):
failed to open stream: No such file or directory in
/usr/share/centreon/www/modules/centreon-clapi/core/class/centreon.Config.Poller.class.php
on line 485

PHP Fatal error: require(): Failed opening required
'../../../include/configuration/configGenerate/genCGICFG.php'
(include_path='/usr/share/centreon/www/modules/centreon-clapi/core/lib:/usr/share/centreon/www/modules/centreon-clapi/core/class:.:/usr/share/pear:/usr/share/php')
in
/usr/share/centreon/www/modules/centreon-clapi/core/class/centreon.Config.Poller.class.php
on line 485



Did you have any idea on how fix it ?

Operator +=

$
0
0
Hallo zusammen,

ich habe ein merkwürdiges Verhalten mit dem "+=" Operator, welches ich nachfolgend erläutern möchte.
Ich habe in der templates.conf folgendes Template definiert (gekürzt), welches standardmäßig von jedem Host eingebunden wird:

Quellcode

1
2
3
4
5
6
7
8
template Host "generic-attributes" {

    	vars.host.notification["mail"] = {

            	groups  = [ "admins", "groupA" ]
            	users	= [ "icingaadmin" ]
    	}
}


Nun möchte ich die Standardbenachrichtigung für einen Host, um eine neue Gruppe ("support") ergänzen.
Es sollen also die Gruppen "admins", "groupA", und "support" informiert werden.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
object Host "abc.mydomain.de" {

    	import "generic-attributes"

    	address     	= "127.0.0.1"

    	vars.host.notification["mail"] += {

            	groups += [ "support" ]
    	}
}


Diese Schreibweise führt aber dazu, dass die Variable "groups" nicht mit der Gruppe "support" ergänzt wird, sondern nur noch die Gruppe "support" enthält. Das vorherige Array wird damit überschrieben. Ist dies ein Fehler?
Wenn ich nämlich die Schreibweise für Template und Host ändere (siehe unten) funktioniert der Operator wie gewünscht.

Quellcode

1
2
3
4
5
6
// Generic Host Attributes
template Host "generic-attributes" {

    	vars.host.notification.mail.groups  = [ "admins", "groupA" ]
    	vars.host.notification.mail.users    = [ "icingaadmin" ]
}


Quellcode

1
2
3
4
5
6
7
8
object Host "abc.mydomain.de" {

    	import "generic-attributes"

    	address     	= "127.0.0.1"

    	vars.host.notification.mail.groups += [ "support" ]
}


Es werden nun alle drei Gruppen benachrichtigt.

Vielen Dank für eure Hilfe!

icinga2 won't send custom email notification

$
0
0
Hi guys!

I have a problem on my icinga2 server about sending email notification. As of this moment it sends email whenever a servicce is OK, WARNING, CRITICAL, and UNKNOWN but when I"m trying to custom message (with comment) I can't receive any message from icinga2...

Here's the log on /etc/icinga2/icinga3.log


[2016-01-20 09:07:24 +0000] information/ExternalCommandListener: Executing external command: [1453280844] SEND_CUSTOM_SVC_NOTIFICATION;vine;JMX Heap;0;icingaadmin;Check this!
[2016-01-20 09:07:24 +0000] information/Checkable: Checking for configured notifications for object 'vine!JMX Heap'
[2016-01-20 09:07:24 +0000] information/Notification: Sending notification 'vine!JMX Heap!mail-icingaadmin' for user 'icingaadmin'
[2016-01-20 09:07:24 +0000] information/Notification: Completed sending notification 'vine!JMX Heap!mail-icingaadmin' for checkable 'vine!JMX Heap'
[2016-01-20 09:07:24 +0000] warning/PluginNotificationTask: Notification command for object 'vine!JMX Heap' (PID: 6872, arguments: '/etc/icinga2/scripts/mail-service-notification.sh') terminated with exit code 36, output: mail: cannot stat `/root/.mail': Permission denied
mail: Cannot open `/root/.mailrc': Permission denied
mail: cannot send message: Process exited with a non-zero status
mail: Cannot open file /root/dead.letter: Permission denied

I don't understand the problem because I new in icinga. I hope you can help me out on this... Thanks! :)

Notification behaviour with types and states defined in users and notifications?

$
0
0
Hi,

currently I am struggeling to understand the notification behaviour.

As far as I understood the notification attributes 'types' and 'states' can be either defined for a user object and a notification template, right?

What's the best approach to accomplish something like that: I have a user that should get all sorts of notifications via email and only criticals via sms. I tried not defining any types and states in the user object, but that did not work out fine -> (as stated in the docs) if there is no type and / or state defined for a user everything is matched.

Can anyone tell me what the proper approach looks like?

Thanks a lot in advance.

Cheers,

Max

.htaccess / Authentification

$
0
0
Hi,
ist in Icingaweb2 irgendwo eine htaccess versteckt? (Die aber nicht .htaccess heissen kann - denn davon gibt es systemweit keine einzige)

Ich habe für icingaweb via vhost eine authentification gesetzt, bekomme aber zusätzlich zu dieser noch eine passwort abfrage vom webserver...

Speziell das css directory scheint noch einen seperaten schutz zu haben... Ich finde es einfach nicht...?!

Weder vhost, noch .htaccess, ich werd wahnsinnig...

check one services from different host

$
0
0
Hi
I have some service when I check from different servers and networks.
Now i Create two host.
First host with local check and send result to master.
Second host (localhost) with remote check firs host.

When i try move check service to one host, on remote check state - PENDING

Configuration:
Firs host - Windows Server on remote network with Icinga Agent 2.4. Local Check with accept configuration from master.
Second - Linux Icinga 2.4.

on Second host in "conf.d" directory create conf with command (script locally), host and services


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
object CheckCommand "chkjira" {
 import "plugin-check-command"

 command = [ SysconfDir + "/icinga2/scripts/check_jira.sh" ]
}

apply Service "Check JIRA" {
 import "normaly-service"
 import "wc-all"

 max_check_attempts = 5
 check_interval = 1h
 retry_interval = 5m

 check_command = "chkjira"

 assign where host.name == "jira4"
}



in directory /etc/icinga2/zone.d/jira4
file hosts.conf

Quellcode

1
2
3
4
5
6
7
object Host "jira4" {
 display_name = "Сервер Ticket системы JIRA"
 import "generic-host"
 
 address = "192.168.254.17"

}


in directory /etc/icinga2/repozitory.d/
file configuration for zone, endpoint creates.

Dynamische Hostguppen

$
0
0
Hallo zusammen,

ich würde gerne hostgruppen dynamisch, in Abhängigkeit von host variablen, erzeugen.

z.B.

object HostGroup host.vars.customer {

assign where host.vars.customer
}

So müsste man nicht jede hostgruppe vorab anlegen.

In der Doku habe ich dazu nichts gefunden.


Viele Grüße
Heino

check_pgsql - Query / Performacedaten

$
0
0
Hallo,

ich möchte per check_pgsql die Größe eine DB überwachen. Das Checkcommand sieht so aus:

Quellcode

1
check_pgsql -H myhost -l myuser -p mypass -d 'mydb' -q 'SELECT pg_database_size(current_database());' -W 5368709120 -C 10737418240


Die Ausgabe sieht so aus:
OK - database mydb (0.021494 sec.)|time=0.021494s;2.000000;8.000000;0.000000
QUERY OK - 'SELECT pg_database_size(current_database());' returned 1897728184.000000|query=1897728184.000000;5368709120;10737418240;;

Allerdings übernimmt Icinga2 nur time= als Performancedaten.

Wie schaffe ich es, dass auch query= als Performancedaten ausgewertet wird?

Danke
Robert

Links in html-formatted notifaction mail is not working when you have to log in

$
0
0
Hi,
I encountered the problem, that when I receive a html-formated mail with a link embedded to acknowledge the problem, the link is only working when I'm authenticated. I think the problem is a rewrite after using the login page, as the urlencoded stuff is urlencoded again, i.e. 'Service%20Bla' -> 'Service%2520Bla'. Does anyone know a solution for the problem?
Cheers
Tobias

edit: To investigate the issue I tried several email notification scripts.
* https://github.com/Voxer/nagios-html-email
* http://nagios.fm4dd.com/howto/nagios-fle…tifications.htm
are two of them.

edit: Typo

Mehrere DB's aber kein Cluster - ido-mysql.conf

$
0
0
Hallo,
ich bin jetzt teilweise von Icinga auf Icinga2 umgestiegen. Hier nochmal auch der Dank an Netmatch. Mir fehlt aber noch eine Konfig zum Göück.
"Damals" habe ich die Daten einer entfernten Icinga Instanz mittels IDO2MYSQL über Port 5668 auf die Hauptinstanz übertragen. Die Verbindung ist geht zu einem Schiff und ist nicht immer stabil. Das funktionierte ziehmlich gut auch mit geringer Bandbreite.
Ich bekomme diese Feature nun bei Icinga2 einfach nicht konfiguriert. Ich habe mir die Doku durchgelsend und war der Meinung es würde reichen wenn ich ein zweites IdoMysqlConnection Object an und konfigieriere zusätzlich zur lokalen icinga2db auch die DB in der Hauptinstanz.

Das Sieht dann folgendermaßen aus:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
library "db_ido_mysql"

object IdoMysqlConnection "ido-mysql" {
  user = "icinga2-ido-mysq",
  password = "xxxxxxxxxx",
  host = "localhost",
  database = "icinga2idomysql"
  instance_name = "XXX"
}


 object IdoMysqlConnection "ido-mysql-Hamburg" {
  user = "icinga_eur",
  password = "xxxxxxxxxxxx",
  host = "10.232.130.201",
  database = "icinga2idomysql",
  instance_name = "XXX"
}



Beim start von Icinga2 sieht es auch gut aus und die neue Instanz wurde auf der Hauptinstanz in der DB angelegt.
Im weiteren verlauf bekomme ich aber dann eine Fehlermeldung im icinga2.log

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
[2016-01-20 16:30:03 +0000] information/DbConnection: Resuming IDO connection: ido-mysql
[2016-01-20 16:30:03 +0000] information/DbConnection: Resuming IDO connection: ido-mysql-Hamburg
[2016-01-20 16:30:03 +0000] information/ConfigItem: Activated all objects.
[2016-01-20 16:30:03 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 4 (schema version: '1.13.0')   <----- Lokale Instanz
[2016-01-20 16:30:07 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 4 (schema version: '1.13.0')   <----- Hauptinstanz in Hamburg
[2016-01-20 16:30:42 +0000] critical/IdoMysqlConnection: Error "Duplicate entry '311-1-USER1' for key 'object_id_2'" when executing query "INSERT INTO icinga_customvariables (config_type, has_been_modified, instance_id, is_json, object_id, varname, varvalue) VALUES ('1', '0', 4, '0', 311, 'USER1', '/usr/lib/nagios/plugins')"
[2016-01-20 16:30:42 +0000] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!
[2016-01-20 16:30:43 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 4 (schema version: '1.13.0')
[2016-01-20 16:30:48 +0000] critical/IdoMysqlConnection: Error "Duplicate entry '313-1-USER1' for key 'object_id_2'" when executing query "INSERT INTO icinga_customvariables (config_type, has_been_modified, instance_id, is_json, object_id, varname, varvalue) VALUES ('1', '0', 4, '0', 313, 'USER1', '/usr/lib/nagios/plugins')"
[2016-01-20 16:30:48 +0000] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!
[2016-01-20 16:30:53 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 4 (schema version: '1.13.0')
[2016-01-20 16:30:55 +0000] critical/IdoMysqlConnection: Error "Duplicate entry '316-1-by_ssh_address' for key 'object_id_2'" when executing query "INSERT INTO icinga_customvariables (config_type, has_been_modified, instance_id, is_json, object_id, varname, varvalue) VALUES ('1', '0', 4, '0', 316, 'by_ssh_address', '$check_address$')"
[2016-01-20 16:30:55 +0000] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!


Die Datenbanken laufen.......
Wen ich nur eine DB ( ob Lokal- oder Hauptinstanz ) konfiguriere dann geht es Fehlerfrei.

Gruß Marco

Business process module looks naked

$
0
0
Hi!

I've installed the business process module for Icinga Web 2 with this:

Quellcode

1
2
3
cd /usr/share/icingaweb2/modules/ 
git clone https://github.com/Icinga/icingaweb2-module-businessprocess.git 
mv icingaweb2-module-businessprocess businessprocess


I've enabled the module and set up /etc/icingaweb2/modules/businessprocess/processes/business_processes.conf like this:


Quellcode

1
2
APC = apc1;Hoststatus && apc3;Hoststatus
display 1;APC;APC



In the browser it looks like this:



While I was expecting it to look more like this:





Are there some css definitions missing?


Thanks,
Marcus

measuring Cpu,Mem and Hdd

$
0
0
I have a requirement to delevop an SNMP Agent on a unix device which send SNMP trap to NMS(Nagios) as a result to some trigger for measuring
CPU,Mem and HD. As a beginner, ive been doin alot of reading on the internet most of all on net-snmp wiki, manpage snmpd.conf .

Questions:
  • does the configuration down below looks correct for triggern with DisMan "monitor" directive ?
  • Iam able to receive traps (/var/log) when hrProcessorLoad is >60, but i couldnt work out with laTable for load average. what iam doing wrong?
  • I didnt figure out on how to send "continuously" traps with the "monitor" directive - is it possible to set back the condition to false ?
  • Ive read the standard for sending traps is a simple bash script with cron and the exec command. how does that work ?
  • How can i send a keep alive to the NMS Machine ?


here is the /etc/snmpd.conf where the "monitor" directive is checking the hrProcessorLoad Load.

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
	###############################################################################
	# Process checks.
	#
	#  The following are examples of how to use the agent to check for
	#  processes running on the host.  The syntax looks something like:
	#
	#  proc NAME [MAX=0] [MIN=0]
	#
	#  NAME:  the name of the process to check for.  It must match
	#     	exactly (ie, http will not find httpd processes).
	#  MAX:   the maximum number allowed to be running.  Defaults to 0.
	#  MIN:   the minimum number to be running.  Defaults to 0.
	#
	#  Examples:
	#
	#  Make sure at least one sendmail, but less than or equal to 10 are running.
	#proc sendmail 10 1
	#proc sshd
	proc cron
	#proc snmp 1 1
	###############################################################################
	# disk checks
	#
	# disk PATH [MIN=DEFDISKMINIMUMSPACE]
	#
	# PATH:  mount path to the disk in question.
	# MIN:   Disks with space below this value will have the Mib's errorFlag set.
	#    	Default value = DEFDISKMINIMUMSPACE.
	# Check the / partition and make sure it contains at least 10 megs.
	#disk / 10000000
	#disk   	/var 5%
	#includeAllDisks  10%
	###############################################################################
	# load average checks
	#
	# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
	#
	# 1MAX:   If the 1 minute load average is above this limit at query
	#     	time, the errorFlag will be set.
	# 5MAX:   Similar, but for 5 min average.
	# 15MAX:  Similar, but for 15 min average.
	# Check for loads:
	load 12 10 5
	# -----------------------------------------------------------------------------
	# Inteface up and down
	# Trap server information
	#trapsink	20.10.43.3 public
	#trap2sink	localhost public
	
	#informsink  localhost public

	
	trapsess -Ci -v 3 -u disman -l authPriv -a SHA -A mypassword -x AES -X password localhost
	
	
	
	#trapcommunity public
	authtrapenable 1
	rouser   	disman auth
	iquerySecName   disman   	
	defaultMonitors      	yes
	#linkUpDownNotifications  no
	
   	
	monitor -u disman -r 30 machineTooBusy hrProcessorLoad > 60
	
	#not working
	#monitor -u disman -o dskPath -o dskAvail -o dskTotal "dskTable" dskErrorFlag 0 1
	#monitor -u disman -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0
	#monitor -u disman -o memErrorName -o memSwapErrorMsg "memory" memSwapError != 0
	#monitor -u disman -o laNames -o laErrMessage  "laTable" laErrorFlag != 0
	
	
	
	###########################################################################
	# SECTION: Agent Operating Mode
	#
	#   This section defines how the agent will operate when it
	#   is running.
	
	# master: Should the agent operate as a master agent or not.
	#   Currently, the only supported master agent type for this token
	#   is "agentx".
	#   
	#   arguments: (on|yes|agentx|all|off|no)
	
 	master      	agentx
	
	# agentaddress: The IP address and port number that the agent will listen on.
	#   By default the agent listens to any and all traffic from any
	#   interface on the default SNMP port (161).  This allows you to
	#   specify which address, interface, transport type and port(s) that you
	#   want the agent to listen on.  Multiple definitions of this token
	#   are concatenated together (using ':'s).
	#   arguments: [transport:]port[@interface/address],...
	
	#agentAddress udp:161
	
	dontLogTCPWrappersConnects 1

Any advice is appreciated! Thanks

NotificationCommand templates

$
0
0
Good Evening everyone,

Been using Nagios and Icinga for awhile (first one, then the other) and I am working on a integration for our helpdesk.

One question I have, and I can't seem to find any information...

Let say I have a the following templates:

template NotificationCommand "hd"
template NotificationCommand "hd-host"
template NotificationCommand "hd-service"


If I have the "arguments" var defined in all, if I import hd into hd-service or hd-host, it only takes the hd-service or hd-host object and doesn't merge the two. Is there any way to merge the two argument objects into one?

measuring Cpu,Mem and Hdd with NET-SNMP

$
0
0
First of all, please move this thread if its the wrong place.

I have a requirement to delevop an SNMP Agent on a unix device which send SNMP trap to NMS(Nagios) as a result to some trigger for measuring
CPU,Mem and HD. As a beginner, ive been doin alot of reading on the internet most of all on net-snmp wiki, manpage snmpd.conf .

Questions:

- does the configuration down below looks correct for triggern with DisMan "monitor" directive ?

- Iam able to receive traps (/var/log) when hrProcessorLoad is >60, but i couldnt work out with laTable for load average. what iam doing wrong?

here it the /etc/snmpd.conf

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
###############################################################################
	# Process checks.
	#
	#  The following are examples of how to use the agent to check for
	#  processes running on the host.  The syntax looks something like:
	#
	#  proc NAME [MAX=0] [MIN=0]
	#
	#  NAME:  the name of the process to check for.  It must match
	#     	exactly (ie, http will not find httpd processes).
	#  MAX:   the maximum number allowed to be running.  Defaults to 0.
	#  MIN:   the minimum number to be running.  Defaults to 0.
	#
	#  Examples:
	#
	#  Make sure at least one sendmail, but less than or equal to 10 are running.
	#proc sendmail 10 1
	#proc sshd
	proc cron
	#proc snmp 1 1
	###############################################################################
	# disk checks
	#
	# disk PATH [MIN=DEFDISKMINIMUMSPACE]
	#
	# PATH:  mount path to the disk in question.
	# MIN:   Disks with space below this value will have the Mib's errorFlag set.
	#    	Default value = DEFDISKMINIMUMSPACE.
	# Check the / partition and make sure it contains at least 10 megs.
	#disk / 10000000
	#disk   	/var 5%
	#includeAllDisks  10%
	###############################################################################
	# load average checks
	#
	# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
	#
	# 1MAX:   If the 1 minute load average is above this limit at query
	#     	time, the errorFlag will be set.
	# 5MAX:   Similar, but for 5 min average.
	# 15MAX:  Similar, but for 15 min average.
	# Check for loads:
	load 12 10 5
	# -----------------------------------------------------------------------------
	# Inteface up and down
	# Trap server information
	#trapsink	20.10.43.3 public
	#trap2sink	localhost public
	
	#informsink  localhost public

	
	trapsess -Ci -v 3 -u disman -l authPriv -a SHA -A mypassword -x AES -X password localhost
	
	
	
	#trapcommunity public
	authtrapenable 1
	rouser   	disman auth
	iquerySecName   disman   	
	defaultMonitors      	yes
	#linkUpDownNotifications  no
	
   	
	monitor -u disman -r 30 machineTooBusy hrProcessorLoad > 60
	
	#not working
	#monitor -u disman -o dskPath -o dskAvail -o dskTotal "dskTable" dskErrorFlag 0 1
	#monitor -u disman -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0
	#monitor -u disman -o memErrorName -o memSwapErrorMsg "memory" memSwapError != 0
	#monitor -u disman -o laNames -o laErrMessage  "laTable" laErrorFlag != 0
	
	
	
	###########################################################################
	# SECTION: Agent Operating Mode
	#
	#   This section defines how the agent will operate when it
	#   is running.
	
	# master: Should the agent operate as a master agent or not.
	#   Currently, the only supported master agent type for this token
	#   is "agentx".
	#   
	#   arguments: (on|yes|agentx|all|off|no)
	
 	master      	agentx
	
	# agentaddress: The IP address and port number that the agent will listen on.
	#   By default the agent listens to any and all traffic from any
	#   interface on the default SNMP port (161).  This allows you to
	#   specify which address, interface, transport type and port(s) that you
	#   want the agent to listen on.  Multiple definitions of this token
	#   are concatenated together (using ':'s).
	#   arguments: [transport:]port[@interface/address],...
	
	#agentAddress udp:161
	
	dontLogTCPWrappersConnects 1



Any advice is appreciated!

Using WATO: Assign delay host notification to Contact group

$
0
0
I have configured Delay host notification (30 minutes) for email notification alert.

I have two contact group (1)Admin and (2)monitoring user.

My requirement is:

Contact group Admin get email alert as per delay host notification value (30 minutes).

Contact group monitoring user will not effect as per delay host notification parameters values and get email notification whenever any event occur.

Thanks
Samia

Eigenes notification script wird nicht geladen; Grundlegende Frage zu check-mk-Notifications

$
0
0
Ich möchte ein eigenes script ausführen anstatt dass nur eine Email aus geht.
Dafür gibts ja die Möglichkeit beim erstellen einer Notification die Methode einzustellen (ich mache das in WATO)
Mein script taucht dort auch auf und kann ausgewählt werden.

Ich habe zu testzwecken einfach die Notification die bei jedem Event eine Email an alle schickt kopiert und statt dem mail-plugin mein eigenes gewählt.

In der Datei ~/var/check_mk/notify/nagios.log
Stehen alle Notiicatin die rausgehen, aber NUR die mit dem mail-plugin.
In WATO hab ich exakt diese Notification kopiert und statt mail mein eigenes sript gewählt.
Aber check_mk will es nicht starten :S
Als Site-user kann ich sie ja auch von Hand im Terminal ausführen aber das Problem ist dass check_mk dass nicht tut.

Ich bin mir total unsicher weil hier:
https://mathias-kettner.com/checkmk_flex…ation%20scripts
Solche custom scripts in Verbindung mit "flexible notificaton" genannt werden.


In der check_mk Doku steht jetzt dass es seit version 1.2.1i2 das "Flexible Notification System" gibt.
An anderer Stelle in der check_mk Doku steht aber dass es seit version "1.2.5i1 Check_MK's new rule based notification system" gibt.

Heißt dass das es grundsätzlich in check_mk das normale " Rule based notification system" und alternativ eben dieses "flexible notication system" gibt?

Ich "sehe den Wald vor lauter Bäumen nicht" und habe zum ersten mal mit Notifications zu tun (nicht nur was check_mk angeht sondern generell auch kein Vorwissen von Nagios o.Ä.)

Momentan kriege ich ja schon Emails, erstmal nur an einen Benutzer (ich selber) und eben ungefiltert...

Kann mich jemand aufklären? Ich habs schon oft gehab dass ich aus der Doku nicht schlau werde weil ich grundsätzlich irgendwie eine ganz andere Vorstellung davon habe wie es funktionieren müsste und hinterher nach langem hin und her dann gemerkt dass es ganz einfach ist wenn man eben eine bestimmte Kleinigkeit weiß ... welche für mich meistens nicht offensichtlich ist :S

icinga2.conf: reference to 'built-in' checks

$
0
0
I have a question regarding checks like 'apt', 'http', 'procs', 'swap', 'users', etc...

They are already defined by default in Icinga2.

However, I can only guess these checks are read into the Icinga2 configuration by the following line in /etc/icinga2/icinga2.conf:

Quellcode

1
include <plugins>

(on line 27 of icinga2.conf)

Am I correct in my reasoning?

If so, am I correct in assuming the above line (implicitly) refers to the configuration file /usr/share/icinga2/include/command-plugins.conf

Thank you for shedding light!

acknowledge eventcommand

$
0
0
Hallo alle,

Ist es möglich auf ein "acknowledge" eines z.b. host.down ein eventcommand auszulösen?
Falls nein: gibt es einen ordentlichen Weg ein script auszulösen wenn z.B. jemand per icingaweb2 ein acknowledge setzt?

gruß,
Magnus
Viewing all 1338 articles
Browse latest View live