noc.config

Module Contents

class noc.config.Config

Bases: noc.core.config.base.BaseConfig

class activator

Bases: noc.core.config.base.ConfigSection

tos
script_threads
buffer_size
connect_retries
connect_timeout
http_connect_timeout
http_request_timeout
http_validate_cert
class audit

Bases: noc.core.config.base.ConfigSection

command_ttl
login_ttl
reboot_ttl
config_ttl
db_ttl
config_changed_ttl
class backup

Bases: noc.core.config.base.ConfigSection

keep_days
keep_weeks
keep_day_of_week
keep_months
keep_day_of_month
class bi

Bases: noc.core.config.base.ConfigSection

language
query_threads
extract_delay_alarms
clean_delay_alarms
reboot_interval
extract_delay_reboots
clean_delay_reboots
chunk_size
extract_window
enable_alarms
enable_reboots
enable_managedobjects
enable_alarms_archive
alarms_archive_policy
alarms_archive_batch_limit
class cache

Bases: noc.core.config.base.ConfigSection

vcinterfacescount
vcprefixes
cache_class
default_ttl
pool_size
class card

Bases: noc.core.config.base.ConfigSection

language
alarmheat_tooltip_limit
class chwriter

Bases: noc.core.config.base.ConfigSection

batch_size
records_buffer
batch_delay_ms
channel_expire_interval
suspend_timeout_ms
topic
write_to
max_in_flight
class classifier

Bases: noc.core.config.base.ConfigSection

lookup_handler
default_interface_profile
default_rule
class clickhouse

Bases: noc.core.config.base.ConfigSection

rw_addresses
db
rw_user
rw_password
ro_addresses
ro_user
ro_password
request_timeout
connect_timeout
default_merge_tree_granularity
encoding
enable_low_cardinality
cluster
cluster_topology
class collections

Bases: noc.core.config.base.ConfigSection

allow_sharing
project_id
class consul

Bases: noc.core.config.base.ConfigSection

token
connect_timeout
request_timeout
near_retry_timeout
host
port
check_interval
check_timeout
release
session_ttl
lock_delay
retry_timeout
keepalive_attempts
base
class correlator

Bases: noc.core.config.base.ConfigSection

max_threads
topology_rca_window
oo_close_delay
discovery_delay
auto_escalation
class customization

Bases: noc.core.config.base.ConfigSection

favicon_url
logo_url
logo_width
logo_height
branding_color
branding_background_color
preview_theme
class date_time_formats

Bases: noc.core.config.params.StringParameter

date_format
datetime_format
month_day_format
time_format
year_month_format
class dcs

Bases: noc.core.config.base.ConfigSection

resolution_timeout
class discovery

Bases: noc.core.config.base.ConfigSection

max_threads
sample
class dns

Bases: noc.core.config.base.ConfigSection

warn_before_expired
class escalator

Bases: noc.core.config.base.ConfigSection

max_threads
retry_timeout
tt_escalation_limit
ets
wait_tt_check_interval
sample
class features

Bases: noc.core.config.base.ConfigSection

use_uvlib
cp
sentry
traefik
cpclient
telemetry
consul_healthchecks
service_registration
pypy
forensic
class fm

Bases: noc.core.config.base.ConfigSection

active_window
keep_events_wo_alarm
keep_events_with_alarm
alarm_close_retries
outage_refresh
total_outage_refresh
enable_rca_neighbor_cache
class geocoding

Bases: noc.core.config.base.ConfigSection

order
yandex_key
yandex_apikey
google_key
google_language
negative_ttl
class gis

Bases: noc.core.config.base.ConfigSection

ellipsoid
enable_osm
enable_google_sat
enable_google_roadmap
tile_size
tilecache_padding
class grafanads

Bases: noc.core.config.base.ConfigSection

db_threads
class http_client

Bases: noc.core.config.base.ConfigSection

connect_timeout
request_timeout
user_agent
buffer_size
max_redirects
ns_cache_size
resolver_ttl
http_port
https_port
validate_certs
class initial

Bases: noc.core.config.base.ConfigSection

admin_user_name
admin_password
admin_email
class layout

Bases: noc.core.config.base.ConfigSection

ring_ring_edge
ring_chain_edge
ring_chain_spacing
tree_horizontal_step
tree_vertical_step
tree_max_levels
spring_propulsion_force
spring_edge_force
spring_bubble_force
spring_edge_spacing
spring_iterations
class logging

Bases: noc.core.config.base.ConfigSection

log_api_calls
log_sql_statements
class login

Bases: noc.core.config.base.ConfigSection

methods
session_ttl
language
restrict_to_group
single_session_group
mutual_exclusive_group
idle_timeout
pam_service
radius_secret
radius_server
register_last_login
class mailsender

Bases: noc.core.config.base.ConfigSection

smtp_server
smtp_port
use_tls
helo_hostname
from_address
smtp_user
smtp_password
class memcached

Bases: noc.core.config.base.ConfigSection

addresses
pool_size
default_ttl
class mongo

Bases: noc.core.config.base.ConfigSection

addresses
db
user
password
rs
retries
timeout
retry_writes
app_name
max_idle_time
class mrt

Bases: noc.core.config.base.ConfigSection

max_concurrency
enable_command_logging
class nbi

Bases: noc.core.config.base.ConfigSection

max_threads
objectmetrics_max_interval
class nsqd

Bases: noc.core.config.base.ConfigSection

addresses
http_addresses
pub_retries
pub_retry_delay
mpub_messages
mpub_size
topic_mpub_rate
ch_chunk_size
connect_timeout
request_timeout
reconnect_interval
compression
compression_level
max_in_flight
class nsqlookupd

Bases: noc.core.config.base.ConfigSection

addresses
http_addresses
class path

Bases: noc.core.config.base.ConfigSection

smilint
smidump
dig
vcs_path
repo
backup_dir
etl_import
ssh_key_prefix
cp_new
bi_data_prefix
babel_cfg
babel
pojson
collection_fm_mibs
supervisor_cfg
legacy_config
cythonize
npkg_root
card_template_path
pm_templates
custom_path
mib_path
class pg

Bases: noc.core.config.base.ConfigSection

addresses
db
user
password
connect_timeout
class ping

Bases: noc.core.config.base.ConfigSection

throttle_threshold
restore_threshold
tos
send_buffer
receive_buffer
ds_limit
class pmwriter

Bases: noc.core.config.base.ConfigSection

batch_size
metrics_buffer
read_from
write_to
write_to_port
max_delay
class proxy

Bases: noc.core.config.base.ConfigSection

http_proxy
https_proxy
ftp_proxy
class redis

Bases: noc.core.config.base.ConfigSection

addresses
db
default_ttl
class rpc

Bases: noc.core.config.base.ConfigSection

retry_timeout
sync_connect_timeout
sync_request_timeout
sync_retry_timeout
sync_retry_delta
sync_retries
async_connect_timeout
async_request_timeout
class sae

Bases: noc.core.config.base.ConfigSection

db_threads
activator_resolution_retries
activator_resolution_timeout
class scheduler

Bases: noc.core.config.base.ConfigSection

max_threads
submit_threshold_factor
max_chunk_factor
updates_per_check
cache_default_ttl
autointervaljob_interval
autointervaljob_initial_submit_interval
class script

Bases: noc.core.config.base.ConfigSection

timeout
session_idle_timeout
caller_timeout
calling_service
class selfmon

Bases: noc.core.config.base.ConfigSection

enable_managedobject
managedobject_ttl
enable_task
task_ttl
enable_inventory
inventory_ttl
enable_fm
fm_ttl
class sentry

Bases: noc.core.config.base.ConfigSection

url
class syslogcollector

Bases: noc.core.config.base.ConfigSection

listen
enable_reuseport
enable_freebind
ds_limit
class icqsender

Bases: noc.core.config.base.ConfigSection

token
retry_timeout
use_proxy
class tgsender

Bases: noc.core.config.base.ConfigSection

token
retry_timeout
use_proxy
class threadpool

Bases: noc.core.config.base.ConfigSection

idle_timeout
shutdown_timeout
class traceback

Bases: noc.core.config.base.ConfigSection

reverse
class trapcollector

Bases: noc.core.config.base.ConfigSection

listen
enable_reuseport
enable_freebind
ds_limit
class web

Bases: noc.core.config.base.ConfigSection

theme
api_row_limit
api_arch_alarm_limit
max_upload_size
language
install_collection
max_threads
macdb_window
enable_remote_system_last_extract_info
class datasource

Bases: noc.core.config.base.ConfigSection

chunk_size
max_threads
default_ttl
class datastream

Bases: noc.core.config.base.ConfigSection

enable_administrativedomain
enable_administrativedomain_wait
enable_alarm
enable_alarm_wait
enable_cfgping
enable_cfgping_wait
enable_cfgsyslog
enable_cfgsyslog_wait
enable_cfgtrap
enable_cfgtrap_wait
enable_dnszone
enable_dnszone_wait
enable_managedobject
enable_managedobject_wait
enable_resourcegroup
enable_resourcegroup_wait
enable_vrf
enable_vrf_wait
enable_prefix
enable_prefix_wait
enable_address
enable_address_wait
class help

Bases: noc.core.config.base.ConfigSection

base_url
branch
language
class tests

Bases: noc.core.config.base.ConfigSection

fixtures_paths
events_paths
beef_paths
class peer

Bases: noc.core.config.base.ConfigSection

enable_ripe
enable_arin
enable_radb
prefix_list_optimization
prefix_list_optimization_threshold
max_prefix_length
rpsl_inverse_pref_style
class metrics

Bases: noc.core.config.base.ConfigSection

default_hist
enable_mongo_hist
mongo_hist
enable_postgres_hist
postgres_hist
default_quantiles
default_quantiles_epsilon = 0.01
default_quantiles_window = 60
default_quantiles_buffer = 100
enable_mongo_quantiles
enable_postgres_quantiles
loglevel
brand
global_n_instances
installation_name
instance
language
language_code
listen
log_format
thread_stack_size
gitlab_url
version_format
node
pool
secret_key
timezone
pg_connection_args

PostgreSQL database connection arguments suitable to pass to psycopg2.connect

mongo_connection_args

Mongo connection arguments. Suitable to pass to pymongo.connect and mongoengine.connect

ch_cluster_topology
setup_logging(self, loglevel=None)

Create new or setup existing logger

get_ch_topology_type(self)

Detect ClickHouse topology type :return: Any of

  • CH_UNCLUSTERED
  • CH_REPLICATED
  • CH_SHARDED
get_customized_paths(self, *args, **kwargs)

Check for customized path for given repo path. Repo path may be given in os.path.join-style components. Returns list of possible paths. One of elements is always repo path, while other may be custom counterpart, if exists. :param prefer_custom: True - customized path first, False - repo path first :param args: Path or path components in os.path.join-style :return: List of possible paths

get_hist_config(self, name)

Get configuration for hist name. Returns list of times or None, if hist is disabled :param name: Hist name :return: List of hist config or None

get_quantiles_config(self, name)

Check if quantile is enabled :return: True if quantile is enabled

noc.config.CHClusterShard
noc.config.CH_UNCLUSTERED = 0
noc.config.CH_REPLICATED = 1
noc.config.CH_SHARDED = 2
noc.config.config