-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.ini
75 lines (71 loc) · 3.1 KB
/
config.example.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# cachet_netbox_sync takes lists of hosts, VMs, sites, ... from netbox and
# creates components in cachet accordingly.
#
# This file contains all information which is required to sync the data. You
# might choose to not store all of it here, though. Any value can be fully or
# partly loaded from the process environment using the python %(...)s syntax.
# Asking for ENV_NETBOX_TOKEN yields the value of $NETBOX_TOKEN.
[netbox]
url=https://netbox.example.com
# supply $NETBOX_TOKEN in the environment
token=%(ENV_NETBOX_TOKEN)s
[cachet]
base_url=https://status.example.com
url=%(base_url)s/api/v1
token=%(ENV_CACHET_TOKEN)s
[base]
# what to do with groups, that are present in cachet, but not in netbox. Set to
# either of these values:
#
# "delete"
# remove them. This is best suited, if all groups in cachet are created by
# this tool.
# "keep"
# to never delete any groups. This may result in ghost groups, which were
# present at the source in the past, but then vanished. Use this value, if
# you have groups which are manually managed in cachet.
unknown_group_action=keep
# how many components or groups may be deleted at once? If the sync tries to
# delete more than the given value, no groups/components are removed at all.
# This acts as a safeguard against wiping the entire cachet database due to
# faulty source data. Specify 0 to never delete anything.
component_delete_limit=10
group_delete_limit=0
# exit with an exit code > 0, if the respective delete limit is hit. New data
# will still added and existing records will still be updated.
component_delete_limit_fail=true
group_delete_limit_fail=true
# define a kind of object to be synced. the section must be prefixed by
# "source.netbox." followed by an arbitrary, unique idenifier. All fields,
# except for endpoint are optional. Add as many of these sections as needed.
[source.netbox.u6]
# the kind of data to get. to work out this value, follow the following steps:
# 1. first visit /api on your nextbox instance
# 2. navigate to the resource to import,
# e.g. /api/virtualization/virtual-machines/
# 3. strip /api and trailing/leading slashes
# e.g. virtualization/virtual-machines
# 4. replace / with . and - with _
# e.g. virtualization.virtual_machines
# 5. that's it.
endpoint=virtualization.virtual_machines
# filters work like URL parameters in the API, e.g.
# .../?cluster__name=kvm-chain-rhtec
# becomes
# filters.cluster__name=kvm-chain-rhtec
# they are AND'ed, so all of the specified values must match.
filters.tenant=uberspace-6
filters.status=1
# show components in groups in the public cachet status page as well as the
# dashboard. Specify any field present in the API response, e.g.
# platform.name => CentOS 7
# site.name => FRA2
# custom_fields.cachet_name => whatever you put in there
# memory => 28672
group_by_field=tenant.name
# set the given group name for all items in this source
#group=
# which field to use as the name, defaults to "name"
#name_field=name
# which field to use as the description, defaults to no description
#description_field=