Skip to content

Instantly share code, notes, and snippets.

@ernetas
ernetas / keybase.md
Created March 28, 2022 09:07
keybase.md

Keybase proof

I hereby claim:

  • I am ernetas on github.
  • I am ernetas (https://keybase.io/ernetas) on keybase.
  • I have a public key ASDuCz-EaOCtzqDtoiVR4oVu-LYuz8UTG8AEnweyMl2UNwo

To claim this, I am signing this object:

These Sony WH-1000XM3 headphones were stolen. If found, please reach me at [email protected]
Part number: P-92480156-H
Serial number: S01-7576960-Q
@ernetas
ernetas / telegraf-xen
Last active January 19, 2021 07:20
Telegraf Xen exec monitoring script
#!/usr/bin/env python3
import socket
hostname = socket.gethostname()
import subprocess
import time
def print_influx_data(xendomain, item, value):
global timestamp
print('xen_' + item + ',domain=' + xendomain + ',host=' + hostname + ' ' + value + ' ' + timestamp)
@ernetas
ernetas / xen.py
Created December 15, 2017 09:57
get xen domains with python
def get_xen_domains():
p = subprocess.Popen(['xl', 'list', '-l'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
out, _ = p.communicate(timeout=60)
out = out.decode('utf-8')
domains = []
for domain in json.loads(out):
domain_name = domain['config']['c_info']['name']
if not domain_name == 'Domain-0':
domains.append(domain_name)
return domains
[2014-11-11 12:02:10,220][WARN ][index.shard.service ] [main] [.marvel-2014.11.11][0] Failed to perform scheduled engine refresh
org.elasticsearch.index.engine.RefreshFailedEngineException: [.marvel-2014.11.11][0] Refresh failed
at org.elasticsearch.index.engine.internal.InternalEngine.refresh(InternalEngine.java:736)
at org.elasticsearch.index.shard.service.InternalIndexShard.refresh(InternalIndexShard.java:469)
at org.elasticsearch.index.shard.service.InternalIndexShard$EngineRefresher$1.run(InternalIndexShard.java:920)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException: read past EOF: SlicedIndexInput(SlicedIndexInput(_1.fdx in MMapIndexInput(path="/var/lib/elasticsearch/acietyprod/nodes/0/indices/.marvel-2014.11.11/0/index/_1.cfs")) in MMapIndexInput(path="/var/lib/ela
root@cacti:/etc/apache2# grep -R "SSL" ./
./sites-enabled/default: SSLEngine on
./sites-enabled/default: SSLCertificateFile certs/server/certificates/cacti.crt
./sites-enabled/default: SSLCertificateKeyFile certs/server/keys/cacti.key
./sites-enabled/default: SSLCACertificateFile certs/CA/monitoringCA.crt
./sites-enabled/default: SSLVerifyClient require
./sites-enabled/default: SSLVerifyDepth 2
./sites-enabled/default:# SSLEngine on
./sites-enabled/default:# SSLCertificateFile /etc/apache2/ssl/samesystem.crt
./sites-enabled/default:# SSLCertificateKeyFile /etc/apache2/ssl/samesystem.key
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-GCM-SHA384
Server public key is 8096 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1.2
Cipher : DHE-RSA-AES256-GCM-SHA384
Session-ID:
class cacti {
# notify { "sdfsafsdaf" }
# package { 'cacti':
# ensure => "installed"
# }
file { '/etc/network/if-up.d/iptables':
ensure => "present",
mode => 755,
owner => "root",
Sun Mar 30 22:55:02.627 [rsHealthPoll] DBClientCursor::init call() failed
Sun Mar 30 22:55:02.628 [rsHealthPoll] replset info backup:20002 heartbeat failed, retrying
Sun Mar 30 22:55:03.631 [rsHealthPoll] DBClientCursor::init call() failed
Sun Mar 30 22:55:03.632 [rsHealthPoll] replSet info backup:20002 is down (or slow to respond):
Sun Mar 30 22:55:03.632 [rsHealthPoll] replSet member backup:20002 is now in state DOWN