Skip to content

Instantly share code, notes, and snippets.

View jupemara's full-sized avatar
💭
😇

jupemara jupemara

💭
😇
View GitHub Profile
@jupemara
jupemara / prepare.py
Last active December 27, 2015 16:09
pyflakesとpep8でpre-commit hookをする何か。スクリプトの途中で`pip install pep8 pyflakes`をしている。ただpre-commitの内容を直接文字列にしてしまっているので、できれば外から取ってきたい。というかいろいろ治したいけど、Version0.1.0ということですいません。
#!/usr/bin/env python
# -*- encodig: utf-8 -*-
import errno
import os
import subprocess
import sys
try:
import pydoc

zabbix2.2新機能

  • 監視の失敗を検知して障害通知
  • EVENTマクロの追加
    • It's include RECOEVERY.
    • どのリカバリ通知がどの障害からきたのかをマクロ(障害通知メッセージで表示できるお)

zabbix2.4新機能とリリースポリシー

Answers

Price(yen) Answer Eoka Kimura Miyamoto Guest
1300 A B X (650) A O B X (650) -
ビール 2700 B B O B O A X (2700) -
栗まんじゅう 1000 B A X (500) A X (500) B O -
サイダー 200 B A X (200) B O B O -
刺し身 4000 B A X (1330) A X (1330) A X (1330) -
@jupemara
jupemara / nginx_stub_status.py
Created June 11, 2014 09:24
Send nginx stub_status to zabbix server by using zabbix_sender protocol. This scripts is compatible with Python2.6.x.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fetch nginx stub status.
"""
import optparse
import subprocess
import urllib2
@jupemara
jupemara / zabbix_api.py
Last active August 29, 2015 14:02
Zabbix API class implemented by python. This script is Python2.6 compatible.
# -*- coding: utf-8 -*-
import json
import urllib2
class ZabbixAPI(object):
headers = {'Content-type': 'application/json'}
@jupemara
jupemara / create_zabbix_screen_by_x_y_elements.py
Last active August 29, 2015 14:03
This script create zabbix screen. This script is compatible for Python 2.6.x.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Create zabbix screen script.
This script creates new own screen
by x-axis elements and y-axis elements of user definition.
"""
import hashlib
@jupemara
jupemara / python_resources.md
Created August 27, 2014 01:56 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@jupemara
jupemara / change_priority_too_many_alerts.py
Last active August 29, 2015 14:06
This script change zabbix trigger priority
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Change trigger priority
that occurs more than specified counts in the specified time period.
"""
import json
import logging
@jupemara
jupemara / ta-02.md
Last active August 29, 2015 14:06
AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day 2014 AWS Cloud Storage & DB Day …

AWSストレージ関連サービスの正しい理解と使い方講座

  • speaker: 榎並 利晃
  • agenda
    1. クラウドストレージ利用する意義
    2. ストレージサービスの紹介
    3. 聞き逃しましたサーセン
    4. 聞き逃しましたサーセン
@jupemara
jupemara / chatwork.py
Last active August 29, 2015 14:06
Talking Chatwork
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script posts a message to the specified chatwork room.
"""
import optparse
import urllib
import urllib2