You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
38
-
or if you use netbox-docker, your `/configuration/plugins.py` file :
37
+
or if you use netbox-docker, your `/configuration/plugins.py` file,
38
+
and define credentials for devices connection:
39
39
40
40
```python
41
41
PLUGINS= [
42
-
'netbox_config_diff'
42
+
"netbox_config_diff",
43
43
]
44
44
45
45
PLUGINS_CONFIG= {
46
-
"netbox_config_diff": {},
46
+
"netbox_config_diff": {
47
+
"USERNAME": "foo",
48
+
"PASSWORD": "bar",
49
+
},
47
50
}
48
51
```
49
52
53
+
Collect static from the plugin:
54
+
55
+
```bash
56
+
python manage.py collectstatic --noinput
57
+
```
58
+
59
+
## Usage
60
+
61
+
Under `Plugins` navbar menu you can find plugin
62
+
63
+

64
+
65
+
Add PlatformSetting objects for your platforms in NetBox.
66
+
67
+
Define:
68
+
69
+
-**Driver** for Scrapli, you can find all drivers in [Scrapli](https://github.com/carlmontanari/scrapli) and [Scrapli community](https://github.com/scrapli/scrapli_community) documentation.
70
+
-**Command** to collect configuration
71
+
- Optional regex patterns to exclude from actual config, specify each pattern on a new line
72
+
73
+

74
+
75
+
Plugin adds a custom script `ConfigDiffScript`
76
+
77
+

78
+
79
+
In the script, you can define a site, on which devices run compliance, or devices.
80
+
If you define both fields, script will run only on devices from `Devices` field
81
+
82
+
> **Warning**
83
+
>
84
+
> Script run only on devices with status `Active`, assigned Primary IP, Platform and PlatformSetting
85
+
86
+

87
+
88
+
After script is done you can find results in `Config Compliances` menu. Each device has its own result.
89
+
90
+

91
+
92
+
## Examples
93
+
94
+
Compliance finished with error
95
+
96
+

97
+
98
+
Render diff between configurations
99
+
100
+

101
+
102
+
No diff
103
+
104
+

0 commit comments