This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mail from: [email protected] | |
503 5.0.0 Polite people say HELO first | |
helo | |
501 5.0.0 helo requires domain address | |
helo idev.com.br | |
250 localhost6.localdomain6 Hello localhost.localdomain [127.0.0.1], pleased to meet you | |
mail from: [email protected] | |
250 2.1.0 [email protected]... Sender ok | |
rcpt to: [email protected] | |
250 2.1.5 [email protected]... Recipient ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Testing MongoDB mass insert with pymongo | |
import pymongo | |
mongo = pymongo.Connection('localhost') | |
mongo_db = mongo['test'] | |
mongo_collection = mongo_db['masstest'] | |
n = 1 | |
limit = 100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm | |
yum update | |
yum --enablerepo=elrepo-kernel install -y kernel-lt | |
sed -i 's/default=1/default=0/' /etc/grub.conf | |
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import statsd | |
n = 1 | |
limit = 100000 | |
while n <= limit: | |
c = statsd.StatsClient('localhost', 8125) | |
c.incr('foo') # Increment the 'foo' counter. | |
c.gauge('foo', random.randint(1, 100000000)) | |
n = n +1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vpoller.client import VPollerClient | |
import json | |
from influxdb.influxdb08 import InfluxDBClient | |
client = VPollerClient(endpoint='tcp://localhost:10123') | |
def get_total_vms(): | |
msg = {'method': 'vm.discover', 'hostname': '1.1.1.1'} | |
r = json.loads(client.run(msg)) | |
data = [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use zabbix | |
select DISTINCT h.host,g.name,t.description,h.hostid,t.triggerid,i.itemid,t.expression,t.value,t.comments,i.units,i.valuemapid,d.triggerdepid from hosts as h join items as i on (h.hostid = i.hostid) join functions as f on (i.itemid = f.itemid) join triggers as t on (f.triggerid = t.triggerid) left join trigger_depends as d on (d.triggerid_down = t.triggerid) INNER JOIN hosts_groups hg ON ( hg.hostid = h.hostid ) LEFT JOIN groups g ON ( g.groupid = hg.groupid ) where h.status = 0 and t.value = 0 and t.status = 0 and i.status = 0 ORDER BY h.host INTO OUTFILE '/tmp/triggers.txt'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from influxdb import InfluxDBClient | |
import random | |
from time import sleep | |
import sys | |
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'metrics') | |
x = 0 | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warnings: 'data' is an invalid keyword argument for 'event.wait'. If you | |
were trying to pass additional data to be used in a template | |
context, please populate 'context' with 'key: value' pairs. Your | |
approach will work until Salt Carbon is out. Please update your | |
state files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO:kolla.image.build:Found the docker image folder at /usr/local/share/kolla/docker | |
INFO:kolla.image.build:Added image base to queue | |
INFO:kolla.image.build:Attempting to run task BuildTask(base) for the first time | |
INFO:kolla.image.build.base:Building | |
INFO:kolla.image.build.base:Step 1 : FROM centos:7 | |
INFO:kolla.image.build.base: ---> 0584b3d2cf6d | |
INFO:kolla.image.build.base:Step 2 : MAINTAINER Kolla Project (https://launchpad.net/kolla) | |
INFO:kolla.image.build.base: ---> Using cache | |
INFO:kolla.image.build.base: ---> db501f862216 | |
INFO:kolla.image.build.base:Step 3 : LABEL kolla_version "3.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"github.com/naoina/toml" | |
"github.com/naoina/toml/ast" | |
) |
OlderNewer