Skip to content

Instantly share code, notes, and snippets.

View runningman84's full-sized avatar

Philipp Hellmich runningman84

View GitHub Profile
@runningman84
runningman84 / jstack_32740_1.txt
Created June 27, 2014 14:52
Logstash freeze using multiline
2014-06-27 16:49:13
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007fe104001000 nid=0x8ef waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
">output" daemon prio=10 tid=0x00007fe0d8104800 nid=0x1d1 in Object.wait() [0x00007fe124951000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e8df9c78> (a org.jruby.ext.thread.SizedQueue)
02.07.2014 10:36:41.271 *WARN* [RMI TCP Connection(4072)-10.1.1.1] org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl Failed to retrieve query result node 732bd44c-7082-4543-ac53-ee41034e9811 javax.jcr.ItemNotFoundException: 732bd44c-7082-4543-ac53-ee41034e9811
at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:384)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:328)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:622)
at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl$FetchNext.perform(NodeIteratorImpl.java:197)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl.fetchNext(NodeIteratorImpl.java:183)
at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl.initialize(NodeIteratorImpl.java:214)
at org.apache.jackrabbit.core.query.lucene.NodeIteratorImpl.hasNext(NodeIteratorImpl.java:163)
at org.apache.sling.jcr.resource.internal.helper.j
@runningman84
runningman84 / aws vm m3.medium
Last active August 29, 2015 14:25
sensu gem install
ubuntu@ip-172-31-xx-yy:~$ time sudo /opt/sensu/embedded/bin/gem install sensu-plugins-http --no-document -V
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/quick/Marshal.4.8/sensu-plugins-http-0.1.1.gemspec.rz
302 Moved Temporarily
GET https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/sensu-plugins-http-0.1.1.gemspec.rz
200 OK
GET https://rubygems.org/specs.4.8.gz
{
"id": 1,
"title": "graphite",
"originalTitle": "graphite",
"tags": [],
"style": "light",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
sensu_filter 'every_3_occurrences' do
attributes(occurrences: 'eval: value % 3 == 0')
end
sensu_filter 'every_5_occurrences' do
attributes(occurrences: 'eval: value % 5 == 0')
end
# vs
- alias: Turn off Arbeitszimmer lights at night
trigger:
platform: time
# When 'after' is used, you cannot also match on hour, minute, seconds.
# Military time format.
#after: '23:00:00'
after: '21:22:00'
#condition:
# condition: state
# entity_id: binary_sensor.net_laptop_philipp
# sensu filter
json {
id => "filter.sensu.json.1"
source => message
target => "sensu"
add_tag => "sensu_found"
}
if ("sensu_found" in [tags]) {
@runningman84
runningman84 / musiccast.py
Last active July 31, 2017 13:24
musiccast component
state output:
media_player.box playing device_id: 00A0DEDFFF
entity_picture: /api/media_player_proxy/media_player.box?token=a61e8aad579a1a58701f3ba722491e8605290ea7e4be7f88b771af6b7a57198c&cache=a50da
friendly_name: Box
is_volume_muted: false
media_album_name: Märchen
media_artist: toksi
media_content_type: music
media_title: Märchen
@runningman84
runningman84 / automations.yaml
Created July 23, 2017 10:40
xiaomi alarm automations
start_flashing_color_light:
alias: "Start color light flashing"
sequence:
- condition: state
entity_id: input_boolean.block_flashing_color_light
state: 'off'
- service: light.turn_on
entity_id: light.gateway_light_f0b429cc30b1
data_template:
color_name: >
{
status: {
hrDeviceStatus: 2,
status1: " Sleeping... ",
status2: " ",
status3: "",
status4: ""
},
identity: {
model_name: "M2070 Series",