Enabling Nagios syntax highlighting in vim
- Nagios Object definitions and other configuration is well-known to be cumbersome and error-prone
- Nagios Config files often consist of 100s of thousands of lines, and editing often requires changes in the middle of a file
- For years people have Nagios throw errors at them on start because of tiny spelling mistakes
- Vi IMproved (vim) lets you use self defined syntax highlighting to avoid common mistakes like missing braces
- Pot meet kettle!
Create a .vim directory and subdirectories
Define .cfg to be a Nagios config file
The Syntax file
Download the Nagios syntax highlighting support
Now enjoy a more helpful Nagios config:
...Unless you hate syntax highlighting, like me
What about Check_MK?
Check_MK Configurations are all-python so they do not need any of this.
VIM has automatic syntax highlighting for Check_MK built-in
..I use :syn off to turn it off