[icinga-users] Graphite with icmp host check_command

2018-11-05 Thread Lee Clemens
Hello,

I have the graphite plugin working for hosts with check_command = "hostalive" 
and for services using "icmp".

However, if I change it to:
template Host "Host Template Generic" {
check_command = "icmp"
}

The graphs no longer appear on the host's page. However, the raw performance 
data does appear and is updated as expected.

The requests to graphite-web are only for "GET 
/metrics/expand?query=monitored-host.host.icmp.perfdata.%2A.value", instead of:
GET /metrics/expand?query=monitored-host.host.hostalive.perfdata.rta.value 
HTTP/1.1" 200
GET /metrics/expand?query=monitored-host.host.hostalive.perfdata.pl.value 
HTTP/1.1" 200
GET /metrics/expand?query=monitored-host.host.hostalive.perfdata.%2A.value 
HTTP/1.1" 200

as they are when using `hostalive`.

Is there a configuration that needs to be made to have the graphite module 
query for icmp's graphite data properly?

I feel like this has come up before, but I just can't seem to find the 
solution. Any help would be appreciated.

Kind Regards,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] check director deployment status

2018-09-10 Thread Lee Clemens
On 09/10/2018 10:30 AM, Václav Mach wrote:
> Hi,
> 
> I'm using a script for automatic deployments of new configuration using 
> director. The script should notify me when some problem occurs. The script is 
> called from cronjob.
> 
> A part of this script checks if the configuration was deployed successfully 
> or not - see 
> https://github.com/CESNET/eduroam-icinga/blob/master/sync/main.sh#L31-L47
> 
> It seems that this specific parts behaves strange. Sometimes it gives me the 
> startup log as it should, but sometimes it just gives me NULL. The deploy 
> takes only several seconds, at least it seems so from icingaweb - 
> configuration is successfully deployed several seconds after cronjob ran.
> 
> Is there some better way to check if the newly deployed configuration is 
> valid and that startup log does not contain any warnings/errors?

It would obviously be an up-front cost, but using the REST API may be useful 
particularly looking forward. You can do a lot with it, including 
/director/config/deploy. However, I'm not sure if you can (yet) read the 
activities or deployments information.

I receive a 404 from /director/config/activities and 
/director/config/deployments, but /director/config/deploy returns the checksum 
that could theoretically be used in further requests/queries. That same 
checksum is stored in the database, so a hybrid approach in the interim may be 
possible e.g.:

mysql# select startup_succeeded, startup_log from director_deployment_log where 
hex(config_checksum) = ''

> 
> cheers,
> Vaclav
> 
> 
> ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Monitoring HA clusters

2018-06-01 Thread Lee Clemens
Hi Antony,

On 05/31/2018 05:12 PM, Antony Stone wrote:
> On Thursday 31 May 2018 at 22:14:04, Chris Boot wrote:
> 
[snip]
> 
> 2. There is a "cluster-zone" Icinga2 check command, which may be what you 
> need 
> (if you can find some sufficiently clear documentation about it; I think this 
> is 
> not easy).

The cluster-zone check is used to check that a zone is connected (e.g. master 
<-> satellite region 1). This is internal Icinga2 functionality; not related to 
an HA cluster of web servers, for example. [Of course you could also create a 
new zone for each app cluster with its own Icinga2 satellite, but that is 
probably overkill for most scenarios.]

https://www.icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#zones

> 
> 3. The standard documentation for "High-Availability Master with Clients" at 
> https://www.icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/ may 
> be helpful - consider the clients as the same machines as the masters?
> 
> 4. If all else fails, it's easy enough to reproduce NRPE functionality using 
> SSH :)
> https://www.icinga.com/docs/icinga2/latest/doc/07-agent-based-monitoring/
> 
> 
> I hope some of the above helps,
> 
> 
> 
> Antony.
> 

-Lee
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Questions regarding IDO DB and multi master setup

2017-05-17 Thread Lee Clemens
Hi Valentin,

On 05/17/2017 10:19 AM, Valentin Höbel wrote:
> Hi Lee,
> 
> thanks for taking the time for a) testing this stuff and b) writing an 
> answer. I appreciate the efforts!
> 

You're welcome! Sorry I don't have a simple answer for you, and I'm certainly 
not telling you how to set things up - just trying to provide some 
info/suggestions.

> 
>> This failure scenario would require a serious network issue if your
>> database cluster was architected to be highly available (any client
>> node can connect to any server node). That's not to say perhaps
>> it could not be handled better.
> 
> That is not the point. It doesn't matter how "bad", "good" or "unusual" the 
> Galera HA setup is. The point is that Icinga2 doesn't failover although it 
> can't access the database. The Galera setup in this case is very special (and 
> yes, I do have reasons to build it that way and no, sorry, since this is a 
> customer project I can't tell you why, sorry, really).
> 

My point is that it is somewhat reasonable that Icinga does not handle this 
failure scenario since it can be avoided with an HA topology.
Perhaps it could be handled better, of course (as I said above).

I presume the design assumption was that if one node cannot connect to the DB, 
the other nodes probably cannot connect either (the serious network issue 
scenario),
so just continue to queue queries up until service is restored.

DB connectivity awareness could be built in to Icinga, for example by passing a 
token between the nodes with "I can (not) connect to the DB" and electing a DB 
writer node.


Pacemaker could probably accomplish this, and there are other ways (e.g. 
Monit), but another thought is:
- If the local Galera crashes, consider that node failed entirely and shutdown 
the local Icinga (potentially causing the DB writer to failover as well).

You'll have to weigh the tradeoffs according to your own situation and 
requirements.

Kind Regards,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Questions regarding IDO DB and multi master setup

2017-05-16 Thread Lee Clemens
My two cents

On 05/16/2017 09:01 AM, Valentin Höbel wrote:
> Dear list,
> 
> I have three questions regarding IDO DB and I hope somone here can point me 
> into the right direction.
> 
> a) IDO DB failover
> ---
> I noticed that there is a failover of the active IDO DB writer when the 
> current IDO DB writer (Icinga2) is powered off.
> After the timeout period of 60 seconds, another Icinga2 master starts to 
> write to the database.
> 
> However, when I kill MariaDB on the server where Icinga2 is currently the IDO 
> DB writer, there is no failover.
> Instead, the Icinga2 instance (which no longer can't write to localhost:3306) 
> remains the active IDO DB writer.
> 
> Is this something which happens on purpose? For me, it is clear that there is 
> a failover when Icinga2 is stopped; but it is not clear to me that there is 
> no failover although Icinga2 can't no longer access the database. Looking at 
> the official documentation I saw no hint why Icinga2 behaves this way.

I tested this and also see it does not failover when I cut off network access 
to my DB cluster's VIP. However, see below regarding buffering.

This failure scenario would require a serious network issue if your database 
cluster was architected to be highly available (any client node can connect to 
any server node). That's not to say perhaps it could not be handled better.

> 
> 
> b) Buffering during IDO DB downtime
> ---
> Let's say I shutdown all database instances while Icinga2 on the masters is 
> still running.
> Icinga2 is now not able to write to the database.
> Let's say I start the database instances again after 10 minutes.
> We had 10 minutes DB downtime.
> 
> - Did Icinga2 buffer/safe the history/queries/the data from the last
>   10 minutes?
> - If yes, will Icinga2 try to write this historical data back to the database
>   as soon as it is available again?
> - If yes, will Icinga2 throw away obsolete data, e.g. when a fresh check 
> result
>   came in and a service state changed?
> 
> I am asking because I want to use the content of IDO DB for generating 
> reports.
> And if Icinga2 doesn't buffer the DB writes during database downtime, the 
> report data will be incomplete.
> 
> I ran a couple of tests and it seems that all data from the database downtime 
> is missing (e.g. check results/service states which are written to IDO DB).

When I cut off access to the database from one Icinga2 master (db writer), 
queries were buffered and resumed once network access returned. In your setup, 
that would equate to the Icinga2 node's local Galera member recovering.

Do you have logs with "notice/WorkQueue" and "Ido*Connection" with "tasks: 
" in it?  When I cutoff access to the database, this number increases 
with the buffered queries as checks are performed, etc. Can you provide these 
similar logs during the database downtime you tested? Once access to the 
database is allowed, do these decrease/queries execute again and drain the 
queue (num tasks decreases)? You may have to adjust your logging level. See 
below for the failover of the queue itself:

> 
> 
> c) Query queuing
> ---
> - I noticed some query queuing stuff in the Icinga2 code and just wanted to 
> know if Icinga2
>uses a queuing mechanism for the database queries.
> - If yes, what happens to the content of the queue when there is a failover 
> of the active
>   IDO DB writer - will the content of the query queue get synchronized to the 
> new IDO DB writer?
> 

I cutoff access to the DB and let the Icinga2 master node/db writer's task 
queue build up to ~1,000 over several minutes. When I manually stopped the 
Icinga2 service, the first queries I saw after the DB failover were for the 
current time (indicating they were not processing the older queries queued by 
the stopped node). However the service stop did take a while, but tasks was 
never > 0 and I don't see any queries with timestamps that indicate they were 
from the shutdown node's query queue.

In fairness, this would require a double-failure of both connectivity to the 
database cluster and then the Icinga2 master node/db writer node also failing.

> 
> 
> My test setup:
> ---
> - 3 x master within a master zone
> - couple of satellites within satellite zones
> - Each server hosting an Icinga2 master also contains one MariaDB instance.
>   All 3 nodes are part of a Galera cluster.
> - IDO DB is activated, ofc with HA enabled (should be the default anyway).
>   Icinga2 has 127.0.0.1 as the IDO DB host (yes, this is on purpose, we can't
>   use a floating Galera service IP here).

For what it's worth, and I obviously don't know your restrictions, using 
Pacemaker with a VIP between the three Icinga2 master / Galera servers could 
resolve this (it wouldn't require an additional device or networking if the 
nodes already have connectivity/L2 adjacency).


Re: [icinga-users] Service dependency not working

2017-04-06 Thread Lee Clemens
On 04/06/2017 01:31 PM, Michael Martinez wrote:
> I've got a bunch of hosts that have a "check_nrpe_service" check and a
> "check_radar" check. I've defined a dependency as shown below. I do a
> service icinga2 reload and the log file does not show any errors
> pertaining to the dependency, which I assume means it loaded correctly
> for all of the hosts that are running these services.
> 

I would suggest running
  icinga2 daemon -C
to see the count of Dependencies (and warning if it won't be applied to 
anything).
As you make changes (change the assign value, ignore), that number should 
change.

> My understanding of this dependency is that if the check_nrpe_service
> is Critical, then check_radar will not perform its scheduled checks.
> 
> apply Dependency "sre-2895a" to Service {
>   parent_service_name = "check_nrpe_service"
>   disable_checks = true
>   disable_notifications = true
>   assign where service.name == "check_radar"
>   ignore where host.vars.host_type == "dummy"
> }

Try removing the ignore rule and seeing if the count changes.

> 
> However, if I disable xinetd, causing "check_nrpe_service" to be
> Critical, "check_radar" continues to do its scheduled checks and also
> becomes Critical. This means the Dependency is not working. Am I doing
> something wrong or is there a bug?
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] IRC guidelines link

2017-03-15 Thread Lee Clemens
Hello,

Not sure the best place to report this, but the shortened link in the IRC 
channel for the new community guidelines eventually redirects to 
icinga.com/wiki - which says the wiki has been moved to GitHub.

New link should be 
https://github.com/Icinga/wiki-archive/blob/master/community/03_01_irc_community_guidelines.md
or goo.gl/BUR5Ji

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Icinga not honoring notification period

2017-03-09 Thread Lee Clemens


On 03/08/2017 10:53 AM, Michael Martinez wrote:
> Icinga2 is sending out notifications in the middle of the night for

[snip]

> and the Timeperiod object:
> 
> {"attrs":{"__name":"9to10","active":true,"display_name":"Icinga 2
> 9to10 
> TimePeriod","excludes":[],"ha_mode":0.0,"includes":[],"is_inside":false,"name":"9to10","original_attributes":null,"package":"_etc","paused":false,"prefer_includes":true,"ranges":{"friday":"12:00-24:00,00:00-01:00","monday":"12:00-24:00,00:00-01:00","thursday":"12:00-24:00,00:00-01:00","tuesday":"12:00-24:00,00:00-01:00","wednesday":"12:00-24:00,00:00-01:00"},"segments":[
> {"begin":1489078800.0,"end":1489122000.0},{"begin":1488992400.0,"end":1489039200.0
> }],"templates":["9to10","legacy-timeperiod"],"type":"TimePeriod","update":{"type":
> "Function"},"valid_begin":1488984089.2413868904,"valid_end":1489122000.0,"vars":null,"version":0.0,"zone":""},"joins":{},"meta":{},"name":"9to10","type":"TimePeriod"}
> 

The timeperiod "9to10" seems to by Midnight to 1 AM and Noon to Midnight for 
each day Monday-Friday?

When exactly have notifications been sent that you didn't expect them to be 
sent?

> As best I can tell, these are configured properly, but Icinga is
> ignoring the time period and still sending out notifications. Any
> thoughts?
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] EventCommand execution

2017-02-28 Thread Lee Clemens
Hello,

We have two master nodes in a top-down configuration.
The Service is active (not agent) and is executed on the master node, and has 
an event_command of a local script.

However, I've noticed the event_command script gets executed on both master 
nodes, simultaneously, for each check attempt/state change.

Is this the intended behavior?

While it _may_ not cause any issues (two scripts trying to reboot a server), 
there could obviously be timing issues:
 (one WMI call almost times out, but reboots it again just as it comes back up).

---
icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.2)

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-514.6.2.el7.x86_64
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.5
  Build host: unknown



Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] problem with the mysql check

2017-01-17 Thread Lee Clemens
I may have copied the wrong config, which specific check command are you using?

Did you try setting the socket?

"-s" = "$mysql_socket$"

Lee Clemens

-Original Message-
From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On Behalf Of 
Mathieu Arnold
Sent: Tuesday, January 17, 2017 3:19 PM
To: Icinga User's Corner <icinga-users@lists.icinga.org>
Subject: Re: [icinga-users] problem with the mysql check

Le 17/01/2017 à 21:05, Lee Clemens a écrit :
> Depending on your my.cnf you can use the host as "localhost".

Like I said, it is not listening on any network interface :-)

> Or define the socket's location:
> "--socket" = {
> value = "$mysql_health_socket$"
> description = "the database's unix socket"
> }

That would be great and all, *but* it would still set the -H $mysql_hostname$ 
and:

 -s, --socket=STRING
Use the specified socket (has no effect if -H is used)


> Lee Clemens
>
> -Original Message-
> From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On 
> Behalf Of Mathieu Arnold
> Sent: Tuesday, January 17, 2017 2:28 PM
> To: icinga-users@lists.icinga.org
> Subject: [icinga-users] problem with the mysql check
>
> Hi,
>
>
> I've been fighting with the mysql check for some time, the problem I have is 
> that mysql is not listening on any INET{,6} socket, only on /tmp/mysql.sock 
> and I don't seem to be able to be able to get the command to *not* pass the 
> -H argument.
>
>
> If I don't supply an argument, icinga ends up adding -H $host.address$, if I 
> set mysql_hostname to "" or null, it ends up passing -H "".
>
>
> So, is there a way to set mysql_hostname to something, that will make it not 
> be there at all ?
>
>
> I think the mysql (and mysql_query) check commands should not set the 
> mysql_hostname by default, or provide a way to not set it.
>
>
> -- Mathieu Arnold
>
> ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.icinga.org_
> mailman_listinfo_icinga-2Dusers=DQICAg=euGZstcaTDllvimEN8b7jXrwqOf
> -v5A_CdpgnVfiiMM=cyTvbR7oDy3PN_AIIi0Lv9lCBPtfF2xPPrjnAmpZfOs=0Ah8K
> P4QTJCh738nX2wUDN2UVRXqAmw_W9RT0T5SN-s=6iN2mHqtCnABjhbarRJd7OcqtyYHc
> UYA30dPNevHi4E=
>
> --
>
> This email has been scanned for spam and viruses by Proofpoint Essentials. 
> Visit the following link to report this email as spam:
> https://us1.proofpointessentials.com/index01.php?mod_id=11_option=
> logitem_id=1484681255-xIT65kH8qt%2BK_address=lclemens%40hammer.
> net=1 ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.icinga.org_
> mailman_listinfo_icinga-2Dusers=DQIGaQ=euGZstcaTDllvimEN8b7jXrwqOf
> -v5A_CdpgnVfiiMM=cyTvbR7oDy3PN_AIIi0Lv9lCBPtfF2xPPrjnAmpZfOs=-wwY0
> is2SY_JW4kqb0NZNHv5Dy1L-IcxCaWxfrMe-B0=6bkj9zcyEhwfnCmNOq9IrBij7rg6t
> Ra0wVnHCfOOQdw=
>


--
Mathieu Arnold

___
icinga-users mailing list
icinga-users@lists.icinga.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.icinga.org_mailman_listinfo_icinga-2Dusers=DQIGaQ=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM=cyTvbR7oDy3PN_AIIi0Lv9lCBPtfF2xPPrjnAmpZfOs=-wwY0is2SY_JW4kqb0NZNHv5Dy1L-IcxCaWxfrMe-B0=6bkj9zcyEhwfnCmNOq9IrBij7rg6tRa0wVnHCfOOQdw=
 


--

This email has been scanned for spam and viruses by Proofpoint Essentials. 
Visit the following link to report this email as spam:
https://us1.proofpointessentials.com/index01.php?mod_id=11_option=logitem_id=1484684333-PnQaf%2By2r1MS_address=lclemens%40hammer.net=
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] problem with the mysql check

2017-01-17 Thread Lee Clemens
Depending on your my.cnf you can use the host as "localhost".

Or define the socket's location:
"--socket" = {
value = "$mysql_health_socket$"
description = "the database's unix socket"
}

Lee Clemens

-Original Message-
From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On Behalf Of 
Mathieu Arnold
Sent: Tuesday, January 17, 2017 2:28 PM
To: icinga-users@lists.icinga.org
Subject: [icinga-users] problem with the mysql check

Hi,


I've been fighting with the mysql check for some time, the problem I have is 
that mysql is not listening on any INET{,6} socket, only on /tmp/mysql.sock and 
I don't seem to be able to be able to get the command to *not* pass the -H 
argument.


If I don't supply an argument, icinga ends up adding -H $host.address$, if I 
set mysql_hostname to "" or null, it ends up passing -H "".


So, is there a way to set mysql_hostname to something, that will make it not be 
there at all ?


I think the mysql (and mysql_query) check commands should not set the 
mysql_hostname by default, or provide a way to not set it.


-- Mathieu Arnold

___
icinga-users mailing list
icinga-users@lists.icinga.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.icinga.org_mailman_listinfo_icinga-2Dusers=DQICAg=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM=cyTvbR7oDy3PN_AIIi0Lv9lCBPtfF2xPPrjnAmpZfOs=0Ah8KP4QTJCh738nX2wUDN2UVRXqAmw_W9RT0T5SN-s=6iN2mHqtCnABjhbarRJd7OcqtyYHcUYA30dPNevHi4E=
 

--

This email has been scanned for spam and viruses by Proofpoint Essentials. 
Visit the following link to report this email as spam:
https://us1.proofpointessentials.com/index01.php?mod_id=11_option=logitem_id=1484681255-xIT65kH8qt%2BK_address=lclemens%40hammer.net=1
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Icinga2 best practices

2016-12-19 Thread Lee Clemens
On 12/19/2016 06:04 PM, Antony Stone wrote:
> On Monday 19 December 2016 at 23:56:44, Volker Janzen wrote:
> 
>> I just read that the new 2.6 docs top-down is recommended and bottom up has
>> been deprecated.
> 
> Oh, I know the docs (I read this bit when it was still 2.5) said that 
> top-down 
> was far more commonly used, but I didn't know bottom-up had now been 
> deprecated.
> 
> That's probably a pity, because I think auto-generation of cloud servers, 
> including their own Icinga configuration, would be far better suited to 
> bottom-
> up, and I also think delegated responsibility for server management, 
> including 
> monitoring, is better suited to bottom-up.

I think it makes sense, as Director becomes more robust and the use of the 
various
 APIs should fit in neatly with automation/orchestration/cloud-based 
methodologies.

I'll be migrating as well, but lots of time available and seems better. My two 
cents :)

-Lee

> 
>> I'm still on 2.5, but will upgrade soon and I think I need to use top-down
>> then to be safe in the future.
> 
> Sounds like it, yes.
> 
> Ho hum.
> 
> 
> Antony.
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Re-notifications with interval = 0

2016-11-28 Thread Lee Clemens
Hi Michael,

On 11/28/2016 03:27 AM, Michael Friedrich wrote:
> Hi,
> 
>> On 28 Nov 2016, at 00:13, Lee Clemens <j...@leeclemens.net> wrote:
>>
>> Hello,
>>
>> I have the following Notification template and apply it as below. This is 
>> working, except if the service remains Warning or Critical - notifications 
>> continue to be sent based on the service's check interval.
> 
> Please show the output of “icinga2 —version”.
> 

icinga2 - The Icinga 2 network monitoring daemon (version: v2.5.4)

Copyright (c) 2012-2016 Icinga Development Team (https://www.icinga.org/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-327.36.3.el7.x86_64
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.5
  Build host: unknown

Thanks,
Lee

> Kind regards,
> Michael
> 
> 
>>
>> My understanding was that interval = 0 should disable such re-notifications, 
>> but it seems to Critical -> Critical or Warning -> Warning checks are 
>> considered hard state changes and notifications are sent (and re-sent).
>>
>> Is this the intended behavior? Is there a way to disable the 
>> re-notifications when the state is not changing? My intent is for Critical 
>> -> Critical or W->W for an unacknowledged service should not trigger 
>> additional pages/notifications.
>>
>> Removing the apply configuration below stops all notifications, so it does 
>> not appear some other configuration is getting involved.
>>
>>
>> template Notification "Test Service Email Template" {
>>command = "Standard Email Service"
>>interval = 0
>>states = [ Critical, OK, Unknown, Warning ]
>>types = [
>>Acknowledgement,
>>    Custom,
>>DowntimeEnd,
>>DowntimeRemoved,
>>DowntimeStart,
>>    FlappingEnd,
>>FlappingStart,
>>Problem,
>>    Recovery
>>]
>> }
>>
>> apply Notification "Apply Email Services Lee Clemens" to Service {
>>import "Test Service Email Template"
>>
>>interval = 0
>>assign where "Notify Lee Clemens" in host.groups
>>users = [ "Lee Clemens" ]
>> }
>>
>>
>> Thanks,
>> Lee Clemens
>> ___
>> icinga-users mailing list
>> icinga-users@lists.icinga.org
>> https://lists.icinga.org/mailman/listinfo/icinga-users
> 
> 
> -- 
> Michael Friedrich, DI (FH)
> Senior Developer
> 
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | michael.friedr...@netways.de
> 
> ** OSMC 2016 - November - netways.de/osmc **
> ** OSDC 2017 - Mai – osdc.de **
> ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] NotificationCommand arguments not inherited

2016-10-18 Thread Lee Clemens
On 10/18/2016 08:50 AM, Markus Frosch wrote:
> On 17.10.2016 20:20, Lee Clemens wrote:
>> arguments = {
>> "--host-output" = {
>> required = true
>> value = "$host.output$"
>> }
>> "--host-state" = {
>> required = true
>> value = "$host.state$"
>> }
>> }
> 
> Hey Lee,
> your problem is that you are *replacing* arguments there.
> 
> What you should do: ( += )
> 
> Regards
> Markus Frosch
> 

Thank you Markus! That makes perfect sense. I created 
https://dev.icinga.org/issues/12941 to address being able to append (vs 
replace) arguments in Director.

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] NotificationCommand arguments not inherited

2016-10-17 Thread Lee Clemens
Hello,

I created the following Notification Plugin Commands via Icinga2 Director, but 
the arguments from the parent template don't appear to be used when the command 
is executed.

- Email Template
- Email Host Template
- Standard Email Host (object)


template NotificationCommand "Email Template" {
import "plugin-notification-command"
arguments = {
"--host-address" = {
required = true
value = "$host.address$"
}
"--host-display-name" = {
required = true
value = "$host.display_name$"
}
"--host-name" = {
required = true
value = "$host.name$"
}
"--notification-author" = {
required = true
value = "$notification.author$"
}
"--notification-comment" = {
required = true
value = "$notification.comment$"
}
"--notification-type" = {
required = true
value = "$notification.type$"
}
"--user-email" = {
required = true
value = "$user.email$"
}
}
}



template NotificationCommand "Email Host Template" {
import "plugin-notification-command"
import "Email Template"

command = [ "/etc/icinga2/scripts/mail-host.py" ]
arguments = {
"--host-output" = {
required = true
value = "$host.output$"
}
"--host-state" = {
required = true
value = "$host.state$"
}
}
}


object NotificationCommand "Standard Email Host" {
import "plugin-notification-command"
import "Email Host Template"

}


[2016-10-17 12:38:02 -0400] warning/PluginNotificationTask: Notification 
command for object 'hostname.example.com' (PID: 8596, arguments: 
'/etc/icinga2/scripts/mail-host.py' '--host-output' 'PING CRITICAL - Packet 
loss = 100%' '--host-state' 'DOWN') terminated with exit code 2, output: usage: 
mail-host.py [-h] --host-name HOST_NAME --host-address HOST_ADDRESS 


As you can see from the warning message, only the two arguments directly on 
"Email Host Template" where used when executing the command.
Since it imports "Email Template", I expected the other arguments to be passed 
along as well.

Should all of the arguments be inherited and used through when it is executed?

Changing it to:

object NotificationCommand "Standard Email Host" {
import "plugin-notification-command"
import "Email Template"
import "Email Host Template"

}


Didn't resolve the issue either, with the same two arguments being the only 
ones used executing the command.

Happy to file a bug if that's the case.

Icinga2 2.5.4

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Icinga Director import - external_object

2016-08-25 Thread Lee Clemens
On 08/23/2016 02:40 PM, Rune 'TheFlyingcorpse' Darrud wrote:
> Set it in the Sync Rule as an external_object when you import :)
> 
> I do this for Zones and Endpoints that gets populated with Puppet.
> 
> Example Sync rule
> Source Name: PuppetDB
> Destination Field: object_type
> Source Column: Custom expression
> Source Expression: external_object

That worked perfectly, thank you!

-Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] Icinga Director import - external_object

2016-08-23 Thread Lee Clemens
Hello,

Hopefully I just missed this, but how do you import/sync objects and have their 
'object_type' set to 'external_object'?

I'm using the latest Director version from github, commit from Aug 23 16:06:05, 
 'remove Services tab'. (sorry, it's on another computer).

I haven't seen anything like "external object" in any drop downs while creating 
any other objects, so how can I import objects as external objects? This is 
obviously breaking my configs due to the "already defined in" errors when 
Director tries to write out configs for objects that already exist thanks to 
the packages/config management files existing.

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] Icingaweb2 ido

2016-02-08 Thread Lee Clemens
Hello,

I'm trying to connect icingaweb2 IDO to MySQL using SSL. This requires 
additional parameters to resources.ini (which are easy from a config read). 
However, I'm running in to trouble adding those fields to the /setup script. 
I'm simply not sure where these html form fields are coming from (I've tried 
several searches for keywords, granted I have limited PHP dev experience). Any 
help would be greatly appreciated.

Work done so far: https://github.com/Icinga/icingaweb2/pull/59

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] Enhance DB IDO performance

2016-01-23 Thread Lee Clemens
Hi Thomas,

Thank you for your response! I will look in to them as I have time and as I get 
my test/home lab setup, thank you for helping me understand the history. They 
are definitely good starting points to look in to performance issues.

I wanted to make sure I wasn't duplicating work in my free time if someone was 
already working on them more often.

Thanks,
Lee

NB: Understood regarding schema/structure related changes, thank you for noting 
it

On 01/23/2016 05:41 AM, Thomas Gelf wrote:
> Hi Clemens,
> 
> they have been assigned to me, but honestly I do not even remember why
> that happened. I do not really feel responsible for them. I'm good at
> troubleshooting, drilling down and figuring out bottlenecks. That's what
> I did with those tickets nearly half a year ago. I had a look at query
> performance and schema and created related issues, wherever I found
> things that could be improved.
> 
> There could be quite some quick wins I guess, but nothing happened since
> them. If you want to steal them please feel free to do so, I do not work
> as a developer and will probably be granted zero time to work on those
> tasks. Eventually ask Michael or Gunnar first   if it is OK for them, or
> even simpler: start with a couple of pull requests referring to those
> (or also newly created). If they look good I guess nobody will hinder
> you from doing even more of the good work ;)
> 
> Thanks,
> Thomas
> 
> NB: Please note that wee also support PostgreSQL. Tuning a MySQL index
> without taking care of PostreSQL is fine, that's how it should be done.
> Applying exactly the same Index to both of them is often a bad idea. But
> as soon as your changes touch table structure your pull requests must
> also take care of PostgreSQL.
> 
> Am 23.01.2016 um 05:04 schrieb Lee Clemens:
>> Hello,
>>
>> There are several subtasks under Enhance DB IDO performance, 
>> https://dev.icinga.org/issues/10073
>>
>> Most of them show as Assigned. Are the assignees actively working on them?
>>
>> While I haven't worked with C++ in a while, I have always been interested in 
>> MySQL - so my experience regarding MySQL tuning/performance plus general 
>> development experience may be valuable :) I'm taking a closer look at my own 
>> installation, but I guess I'm hoping to for help being pointed in a 
>> direction towards what I can help with in the base code.
>>
>> Any advice is greatly appreciated.
>>
>> Thanks,
>> Lee Clemens
>> ___
>> icinga-users mailing list
>> icinga-users@lists.icinga.org
>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>
> 
> -- 
> Thomas Gelf
> Principal Consultant
> 
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | thomas.g...@netways.de
> 
> ** OSDC 2016 - April - netways.de/osdc **
> ** OSBConf 2016 - September - osbconf.org **
> ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
> 
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] Enhance DB IDO performance

2016-01-22 Thread Lee Clemens
Hello,

There are several subtasks under Enhance DB IDO performance, 
https://dev.icinga.org/issues/10073

Most of them show as Assigned. Are the assignees actively working on them?

While I haven't worked with C++ in a while, I have always been interested in 
MySQL - so my experience regarding MySQL tuning/performance plus general 
development experience may be valuable :) I'm taking a closer look at my own 
installation, but I guess I'm hoping to for help being pointed in a direction 
towards what I can help with in the base code.

Any advice is greatly appreciated.

Thanks,
Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


[icinga-users] systemd unit file issue

2016-01-12 Thread Lee Clemens
Hello,

I noticed on a server without mariadb.service present (or presumably another 
service/unit further requiring network), that icinga2.service would attempt to 
start before network (race) and would usually fail with critical/ApiListener: 
Cannot bind TCP socket for host.

Adding 'network.target' to the [Unit] After argument in the unit file resolved 
the race condition.

I'm not sure this is the right place to report this issue (Using 
icinga2-common-2.4.1-1.el7.centos.x86_64 from 
http://packages.icinga.org/epel/$releasever/release/).

-Lee Clemens
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Re: [icinga-users] SELinux question

2016-01-06 Thread Lee Clemens
On 01/05/2016 12:14 PM, John Nguyen wrote:
> Happy New Year.
> 
> Does anyone happen to know if there is an SELinux Boolean or FContext for 
> Icingaweb2 to write to the IDO database?  In my case I'm using the Postgresql 
> 9.4 database via Software Collections on RHEL 6.7.
> 
> Thanks
> John
> 
> 
> ___
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
> 

Are you seeing 'SELinux is preventing' messages related to icingaweb2 and/or 
postgresql in /var/log/messages? I have it running with MySQL and haven't seen 
any issues but would be happy to compare info I see for what is labeled what, 
etc if you can pinpoint what SELinux is (or would be) blocking.

- Lee
___
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users