Skip to content

Instantly share code, notes, and snippets.

View andrusstrockiy's full-sized avatar

Andruss andrusstrockiy

  • moex.com
  • Moscow
View GitHub Profile
@andrusstrockiy
andrusstrockiy / nagios_template.py
Created January 10, 2018 08:31 — forked from jm-welch/nagios_template.py
A simple template for writing Nagios plugin in Python
#! /usr/bin/env python
###############################################################################
# Nagios plugin template
#
# Notes
# - The RHEL boxes I work on are currently limited to Python 2.6.6, hence the
# use of (deprecated) optparse. If I can ever get them all updated to
# Python 2.7 (or better yet, 3.3), I'll switch to argparse
# - This template runs in 2.6-3.3. Any changes made will need to be appropriate
/usr/bin/python2.7 /home/andruss/PycharmProjects/lbsoap/getVgroups.py
DEBUG:suds.client:sending to (http://192.168.30.24:34012)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:api3" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:Login>
<login>admin</login>
<pass></pass>
/usr/bin/python2.7 /home/andruss/PycharmProjects/lbsoap/getVgroups.py
DEBUG:suds.client:sending to (http://192.168.30.24:34012)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="urn:api3" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:Login>
<login>admin</login>
<pass></pass>
@andrusstrockiy
andrusstrockiy / lbiptv-iptvportal.py
Created January 30, 2016 11:52
to modiev with love
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
RM #11618
Модуль взаимодействия с IPTV-порталом iptvportal.ru (http://iptvportal.ru/)
Обрабатываемые события:
- создание учетки = создание учетки на портале
- измение блокировки учетки = вкл/выкл на портале
- вкл/откл услуги = добавление/удаление пакета