{% extends 'generic/object.html' %} {% load helpers %} {% block subtitle %}
{{ object.created|isodatetime:"minutes" }} by {{ object.user|placeholder }}
{% endblock %} {% block control-buttons %} {% if object.state == 'awaiting_approval' and can_approve %}
{% csrf_token %}
{% endif %} {% if can_deploy and object.state == 'planned' or can_deploy and object.state == 'confirm' %}
{% csrf_token %} {% if object.state == 'confirm' %} {% endif %}
{% endif %} {% if can_discard and object.is_open or can_discard and object.state == 'queued' or can_discard and object.state == 'running' %}
{% csrf_token %}
{% endif %} {% endblock %} {% block content %} {% if object.state == 'queued' or object.state == 'running' %} {% endif %} {% if object.is_rollback and object.is_open %}
Rollback to revision {{ object.rollback_to }}. Afterwards each rolled-back object is locked: its pending NetBox changes are not deployed until NetBox matches the rolled-back state again, or the lock is released.
{% endif %} {% if offer_activate %}
Changes are waiting for activation in Checkmk. Next step: activate them. Activate in Checkmk
{% endif %} {% if outside_scope %}
Outside your responsibility (no change permission in NetBox), so you can neither deploy nor approve this plan: {{ outside_scope|join:", " }}.
{% endif %} {% if foreign_authors and object.is_open %}
Contains changes by {{ foreign_authors|join:", " }}.
{% endif %}

Deployment

{% if timing.duration_text %} {% elif object.is_open or object.state == 'queued' or object.state == 'running' %} {% if timing.ops %}{% endif %} {% endif %} {% if object.result.discovery %}{% endif %} {% if object.result.bake %}{% endif %} {% if object.result.activation %} {% elif object.revision and object.state != 'failed' %} {% endif %}
Instance{{ object.instance|linkify }}
Kind{{ object.get_kind_display }}{% if object.is_rollback %} to revision {{ object.rollback_to }}{% endif %}
State{{ object.get_state_display }}
Scope{{ object.get_scope_display }}{% if object.selection %} ({{ object.selection|length }} objects){% endif %}
Message{{ object.message|placeholder }}
Authors of the changes{{ object.authors|join:", "|placeholder }}
Approved by{{ object.approved_by|placeholder }}{% if object.approved_at %} ({{ object.approved_at|isodatetime:"minutes" }}){% endif %}
Plan hash{{ object.plan_hash|truncatechars:20 }}
Started / finished{{ object.started|isodatetime:"minutes"|placeholder }} / {{ object.finished|isodatetime:"minutes"|placeholder }}
Duration{{ timing.duration_text }} for {{ timing.ops }} operation{{ timing.ops|pluralize }}
Expected durationabout {{ timing.expected_text }} for {{ timing.ops }} operation{{ timing.ops|pluralize }} ({{ timing.base_text }} base plus {{ timing.per_op|floatformat:2 }} s per operation, {% if timing.measured %}from the recent deploys of this instance{% else %}cautious estimate, no earlier deploy with many operations yet{% endif %}); time limit of the job {{ timing.timeout_text }}
Job{% if object.job %}{{ object.job }}{% else %}—{% endif %}
Revision{% if object.revision %}{{ object.revision|linkify }}{% else %}—{% endif %}
Discovery{{ object.result.discovery.status }}: {{ object.result.discovery.message }}
Bake agents{{ object.result.bake.status }}: {{ object.result.bake.message }}
Activation{{ object.result.activation.status }}: {{ object.result.activation.message }}
Activationnot by this deploy (Activate after deploy was off)

Safety gate

{% for reason in object.gate.reasons %}{% endfor %} {% for note in object.gate.notes %}{% endfor %}
Verdict{{ object.gate.verdict }}
Hosts in last revision{{ object.gate.host_count }}
Desired hosts{{ object.gate.desired_count }}
Plan{% for k, v in object.counts.items %}{% if v %}{{ v }} {{ k }} {% endif %}{% endfor %}
{{ reason }}
{{ note }}
{% if hints %}

Notes

{% for link, msgs in hints %} {% endfor %}
{% if link.1 %}{{ link.0 }}{% else %}{{ link.0 }}{% endif %}{% for m in msgs %}
{{ m }}
{% endfor %}
{% endif %} {% if conflicts %}

Not deployable

{% for link, msgs in conflicts %} {% endfor %}
{% if link.1 %}{{ link.0 }}{% else %}{{ link.0 }}{% endif %}{% for m in msgs %}
{{ m }}
{% endfor %}
{% endif %}

Operations

{% for op in operations %} {% empty %} {% endfor %}
OperationTargetObjectDetailsResult
{{ op.kind }} {{ op.target }} {% if op.object_ref %}{{ op.object_ref }}{% endif %} {% if op.kind == 'update' %}{% include 'netbox_checkmk_sync/inc/diff.html' with diff=op.data.diff %} {% elif op.kind == 'move' %}{{ op.data.from }} → {{ op.data.to }} {% elif op.kind == 'rename' %}{{ op.data.old_name }} → {{ op.target }} {% elif op.kind == 'create' %}folder {{ op.data.folder }}, {{ op.address }} {% elif op.kind == 'orphan' %}mark as orphaned, deletion on {{ op.data.deletion_on }} {% elif op.kind == 'release' %}
hand back to manual configuration; the host stays
{% include 'netbox_checkmk_sync/inc/diff.html' with diff=op.data.diff %} {% elif op.kind == 'delete' %}folder {{ op.data.folder }} {% elif op.kind == 'cluster' %}cluster host, nodes {{ op.data.nodes|join:", " }}, folder {{ op.data.folder }} {% elif op.kind == 'nodes' %}nodes {{ op.data.from|join:", "|default:"—" }} → {{ op.data.nodes|join:", " }} {% elif op.kind == 'contact_group' %}{{ op.data.alias }} {% elif op.kind == 'contact_group_delete' %}no longer needed {% elif op.kind == 'tag_group' %}{{ op.data.action }}: {% for t in op.data.group.tags %}{{ t.id }}{% if not forloop.last %}, {% endif %}{% endfor %} {% elif op.kind == 'tag_group_remove' %}{% if op.data.action == 'delete' %}delete the group{% else %}remove {{ op.data.removed|join:", " }}{% endif %}{% if op.data.in_use %} (still in use: {% for t, hosts in op.data.in_use.items %}{{ t }} on {{ hosts|length }} hosts {% endfor %}){% endif %} {% elif op.kind == 'user' %}{% if op.data.action == 'create' %}create without login ({{ op.data.email }}), groups {{ op.data.groups|join:", " }}{% else %}{% if op.data.added %}add {{ op.data.added|join:", " }} {% endif %}{% if op.data.removed %}remove {{ op.data.removed|join:", " }}{% endif %}{% endif %} {% elif op.kind == 'notification_rule' %}{{ op.data.action }} the notification rule for this team {% elif op.kind == 'notification_rule_delete' %}delete notification rule {{ op.data.rule_id }} {% elif op.kind == 'rule' %}{{ op.data.action }}{% if op.data.rule %} rule in {{ op.data.rule.ruleset }}{% endif %} {% elif op.kind == 'downtime' %}{% if op.data.action == 'set' %}set a downtime (status offline/failed){% else %}remove the downtime{% endif %}{% endif %}
{% if op.result %} {% if op.result.status == 'ok' %}ok {% elif op.result.status == 'failed' %}failed {% elif op.result.status == 'deferred' %}deferred {% else %}{{ op.result.status }}{% endif %} {{ op.result.message }} {% else %}—{% endif %}
Nothing to do: Checkmk already matches {% if object.is_rollback %}the target revision{% else %}NetBox{% endif %} for this scope.
{% include "netbox_checkmk_sync/inc/busy.html" %} {% endblock %}