Skip to content

Instantly share code, notes, and snippets.

@xorpaul
xorpaul / ArbiterObjectDefinition
Last active August 29, 2015 13:56
Arbiter Object Definition
===== Arbiter Definition ======
===== Description =====
The Arbiter object is a way to define Arbiter daemons that will manage the configuration and all different architecture components of shinken (like distributed monitoring and high availability). It reads the configuration, cuts it into parts (N schedulers = N parts), and then sends them to all others elements. It manages the high availability part : if an element dies, it re-routes the configuration managed by this falling element to a spare one. Its other role is to receive input from users (like external commands of shinken.cmd) and send them to other elements. There can be only one active arbiter in the architecture.
The Arbiter definition is optional. If no arbiter is defined, Shinken will "create" one for the user. There will be no high availability for the Arbiter (no spare), and it will use the default port on the server where the daemon is launched.
===== Definition Format =====
@xorpaul
xorpaul / ShinkenArbiter.md
Last active August 29, 2015 13:56
Shinken Spare Arbiter Debug

[1393254297] Info : And arbiter is launched with the hostname:shinken-main.domain.tld from an arbiter point of view of addr:shinken-main.domain.tld

[1393254297] Info : And arbiter is launched with the hostname:shinken-spare.domain.tld from an arbiter point of view of addr:shinken-main.domain.tld

@xorpaul
xorpaul / ElasticsearchCluster
Last active August 29, 2015 13:59
Elasticsearch Cluster
Elasticsearch 1.1.0 with OpenJDK Java7 on Debian Wheezy
On 2 a.m. the cluster state switched to red
# head es_cluster.log
[2014-04-14 02:00:01,504][INFO ][cluster.metadata ] [es@log01] [logstash-2014.04.14] creating index, cause [auto(bulk api)], shards [2]/[1], mappings [_default_]
[2014-04-14 02:00:02,938][INFO ][cluster.metadata ] [es@log01] [puppetmaster-2014.04.14] creating index, cause [auto(bulk api)], shards [2]/[1], mappings []
[2014-04-14 10:46:12,318][INFO ][node ] [es@log01] stopping ...
[2014-04-14 10:46:12,446][WARN ][netty.channel.DefaultChannelPipeline] An exception was thrown by an exception handler.
@xorpaul
xorpaul / shinkenBrokerd
Created May 2, 2014 13:39
shinken Broker stops modules
2014-04-30 00:00:02,442 [1398808802] Info : [broker-monitorserver-A01] Moving the old log file from nagios.log to archives/nagios-04-29-2014-00.log
2014-04-30 07:24:11,588 [1398835451] Warning : [broker-monitorserver-A01] Connection problem to the scheduler scheduler-monitorserver-B02: connection timeout receiving
2014-04-30 07:26:12,198 [1398835572] Warning : [broker-monitorserver-A01] Connection problem to the poller poller-monitorserver-B02: connection timeout receiving
2014-04-30 07:26:12,473 [1398835572] Warning : [broker-monitorserver-A01] Connection problem to the scheduler scheduler-monitorserver-A01: unknown object ID
2014-04-30 07:26:12,476 [1398835572] Warning : [broker-monitorserver-A01] Connection problem to the scheduler scheduler-monitorserver-B03: unknown object ID
2014-04-30 07:27:15,562 [1398835635] Info : [broker-monitorserver-A01] Connection problem to the scheduler scheduler-monitorserver-B02: connection failed
2014-04-30 07:27:15,682 [1398835635] Warning : [broker-monitorserver-A01
@xorpaul
xorpaul / icinga2_multisite
Last active August 29, 2015 14:03
icinga2_multisite
add tcp socket
cat /etc/xinetd.d/livestatus
service livestatus
{
type = UNLISTED
port = 6557
socket_type = stream
protocol = tcp
wait = no

Keybase proof

I hereby claim:

  • I am xorpaul on github.
  • I am xorpaul (https://keybase.io/xorpaul) on keybase.
  • I have a public key whose fingerprint is 3F46 05A6 55D8 A3C3 CF29 5563 1B65 5972 CCD6 FAA1

To claim this, I am signing this object:

@xorpaul
xorpaul / coreos_systemd_dhcp.md
Last active August 29, 2015 14:08
CoreOS/systemd-resolve daemon DHCP problem

This CoreOS VM is supposed to work with DHCP, but creates an invalid resolv.conf and does not send its hostname to the DHCP server, which prevents the DNS resolution of the VM's FQDN from working.

# systemctl --version
systemd 215
-PAM -AUDIT -SELINUX +IMA -SYSVINIT +LIBCRYPTSETUP -GCRYPT -ACL -XZ +SECCOMP -APPARMOR
# cat /etc/lsb-release 
DISTRIB_ID=CoreOS
@xorpaul
xorpaul / speed_unreadable
Last active August 29, 2015 14:08
KVM /sys/class/net/eth0/speed not readable
# stat /sys/class/net/eth0/speed
File: `/sys/class/net/eth0/speed'
Size: 4096 Blocks: 0 IO Block: 4096 regular file
Device: dh/13d Inode: 6340 Links: 1
Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-10-28 15:27:49.719631816 +0100
Modify: 2014-10-28 15:27:49.719631816 +0100
Change: 2014-10-28 15:27:49.719631816 +0100
Birth: -
# cat /sys/class/net/eth0/speed
@xorpaul
xorpaul / puppetdb_gc_error
Created January 2, 2015 16:58
PuppetDB 1.6.3 Garbace collection stack trace
2014-10-05 12:37:23,333 ERROR [pool-3-thread-3] [cli.services] Error during garbage collection
java.sql.BatchUpdateException: Batch entry 0 DELETE FROM resource_params_cache WHERE NOT EXISTS (SELECT * FROM catalog_resources cr WHERE cr.resource=resource_params_cache.resource) was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746)
at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:457)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893)
at com.jolbox.bonecp.StatementHandle.executeBatch(StatementHandle.java:469)
at clojure.java.jdbc.internal$do_prepared_STAR_$fn__2140.invoke(internal.clj:356)
at clojure.
[commands]
command1=value1
command2=value2
...