Skip to content

Commit

Permalink
Merge pull request #108 from opinkerfi/okconfig-1.3.5-1
Browse files Browse the repository at this point in the history
Okconfig 1.3.5 1
  • Loading branch information
gardart committed Oct 8, 2021
2 parents 1e0d5db + 3148f5e commit 5eed6f7
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 21 deletions.
36 changes: 29 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ adagios.conf
*.mo
*.bak

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
# VS Code
.vscode/

# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
Expand All @@ -41,6 +44,7 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
Expand All @@ -67,8 +71,10 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
Expand All @@ -78,6 +84,7 @@ coverage.xml
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -88,6 +95,7 @@ instance/

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/
Expand All @@ -102,8 +110,19 @@ ipython_config.py
# pyenv
.python-version

# celery beat schedule file
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
Expand All @@ -116,6 +135,7 @@ venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
Expand All @@ -135,8 +155,10 @@ dmypy.json
# Pyre type checker
.pyre/

### Python Patch ###
.venv/
# pytype static type analyzer
.pytype/

# VS Code
.vscode/
# profiling data
.prof

# End of https://www.toptal.com/developers/gitignore/api/python
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ script:
- coverage run --source=okconfig tests/test.py
after_success:
- coveralls
deploy:
provider: pypi
user: gardart
password:
secure: E/DXi3f91+dAoe6+ENQgxEnLMz68oJ5GBlGT/xSD2par0NUQ93sWeIWpXBjxi3ZRRBU4NIaFWfSei/cX81JDLA2h6PmOIer01tByqBlRFDsoPAtQzFgY9lHO8IknbMc59GXZF7vzA71qJaRjxYH8BXowqISTOJnqPJ0qzjC2LDI=
on:
tags: true
branch: master
notifications:
email: false
irc:
Expand Down
2 changes: 1 addition & 1 deletion okconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
__copyright__ = "Copyright 2011, Pall Sigurdsson"
__credits__ = ["Pall Sigurdsson"]
__license__ = "GPL"
__version__ = "1.3.4"
__version__ = "1.3.5"
__maintainer__ = "Gardar Thorsteinsson"
__email__ = "gardar@ok.is"
__status__ = "Development"
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pynag>=0.9.1
paramiko
unittest2
setuptools_rust
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# setup.py ###
from __future__ import absolute_import
from __future__ import print_function
from distutils.core import setup
#from distutils.core import setup
from setuptools import setup
import os

NAME = "okconfig"
Expand Down Expand Up @@ -51,11 +52,13 @@ def get_filelist(path):
description=SHORT_DESC,
long_description=LONG_DESC,
author_email='palli@opensource.is',
maintainer='Gardar Thorsteinsson',
maintainer_email='gardar@ok.is',
url='http://okconfig.org',
license='GPL',
scripts=['usr/bin/okconfig'],
packages=['okconfig'],
requires=['unittest2'],
install_requires=['paramiko','pynag','six','future'],
install_requires=['paramiko','pynag','six','future','setuptools_rust'],
data_files=data_files,
)
13 changes: 13 additions & 0 deletions usr/share/okconfig/examples/iis.cfg-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
define service {
use okc-windows-check_eventlog
host_name HOSTNAME
contact_groups GROUP
service_description Event ID 15021 - HTTP Service SSL Availability
__FILE "file=System"
__SCANRANGE "scan-range=-24h"
__FILTER "filter=id = 15021"
__CRITICAL "critical=count gt 0"
__EXTRAOPTS show-all

}

44 changes: 44 additions & 0 deletions usr/share/okconfig/examples/web.cfg-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
define service {
use okc-check_http
host_name HOSTNAME
contact_groups GROUP
service_description HTTP Response

__URI /
__SEARCH_STRING
__RESPONSE_WARNING 2
__RESPONSE_CRITICAL 10
__VIRTUAL_HOST HOSTNAME
__PORT 80
}

define service {
host_name HOSTNAME
contact_groups GROUP
service_description HTTPS Response
check_command okc-check_https
use okc-check_https

__URI /
__SEARCH_STRING
__RESPONSE_WARNING 2
__RESPONSE_CRITICAL 10
__VIRTUAL_HOST HOSTNAME
__PORT 443

}


define service {
host_name HOSTNAME
contact_groups GROUP
service_description SSL Certificate
check_command okc-check_ssl_cert
use okc-check_ssl_cert

__CERTIFICATE_AGE_WARNING 21
__CERTIFICATE_AGE_CRITICAL 2
__PORT 443
__PROTOCOL https
__CERTOPTIONS -N
}
87 changes: 87 additions & 0 deletions usr/share/okconfig/examples/xrd-central-server.cfg-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

define service {
use okc-check_http
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/80 - HTTP

__URI /
__SEARCH_STRING
__RESPONSE_WARNING 8
__RESPONSE_CRITICAL 10
__VIRTUAL_HOST HOSTNAME
__EXTRAOPTIONS -e 403
__PORT 80

}

define service {
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/4000 - NGINX Admin GUI
use okc-check_https

__URI /
__SEARCH_STRING
__RESPONSE_WARNING 8
__RESPONSE_CRITICAL 10
__VIRTUAL_HOST HOSTNAME
__PORT 4000

}

define service {
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/4000 - NGINX Admin GUI - Certificate
use okc-check_https_certificate

__CERTIFICATE_AGE_WARNING 21
__CERTIFICATE_AGE_CRITICAL 2
__RESPONSE_WARNING 8
__RESPONSE_CRITICAL 10
__PORT 4000
}

define service {
use okc-check_tcp
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/4001 - Central Server Communication
__PORT 4001
}

define service {
use okc-linux-check_proc
host_name HOSTNAME
contact_groups GROUP
__NAME nginx
__WARNING 1:
__CRITICAL :50
service_description XRD - Process - nginx
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - nginx
__NAME nginx
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-jetty
__NAME xroad-jetty
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-signer
__NAME xroad-signer
}

92 changes: 92 additions & 0 deletions usr/share/okconfig/examples/xrd-security-server.cfg-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

define service {
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/4000 - Admin GUI
use okc-check_https

__URI /
__SEARCH_STRING
__RESPONSE_WARNING 8
__RESPONSE_CRITICAL 10
__VIRTUAL_HOST HOSTNAME
__PORT 4000

}

define service {
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/4000 - Admin GUI - Certificate
use okc-check_https_certificate

__CERTIFICATE_AGE_WARNING 21
__CERTIFICATE_AGE_CRITICAL 2
__RESPONSE_WARNING 8
__RESPONSE_CRITICAL 10
__PORT 4000
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-signer
__NAME xroad-signer
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-proxy
__NAME xroad-proxy
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-confclient
__NAME xroad-confclient
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-proxy-ui-api
__NAME xroad-proxy-ui-api
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-monitor
__NAME xroad-monitor
}

define service {
use okc-linux-check_service
host_name HOSTNAME
contact_groups GROUP
service_description XRD - Service - xroad-opmonitor
__NAME xroad-opmonitor
}

define service {
use okc-check_tcp
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/5500 - Message Transport
__PORT 5500
}

define service {
use okc-check_tcp
host_name HOSTNAME
contact_groups GROUP
service_description XRD - tcp/5577 - Message Transport OCSP
__PORT 5577
}

0 comments on commit 5eed6f7

Please sign in to comment.