From 94e8e6de2302c74aa6b4dc8f5a30dfbaff385387 Mon Sep 17 00:00:00 2001 From: Eric Loyd Date: Thu, 11 Jul 2024 17:16:31 -0400 Subject: [PATCH] Adding to Git --- 00README.md | 29 +++++++++++++++++++++++++++++ Makefile | 8 ++++++++ 2 files changed, 37 insertions(+) create mode 100644 00README.md create mode 100644 Makefile diff --git a/00README.md b/00README.md new file mode 100644 index 0000000..172cd7c --- /dev/null +++ b/00README.md @@ -0,0 +1,29 @@ +# Things we need to know + +## Creating a profile from the command line + +``` +wget -O XI_DiagnosticProfile.sh https://assets.nagios.com/downloads/support/XI_DiagnosticProfile.sh +chown root XI_DiagnosticProfile.sh +chmod 700 XI_DiagnosticProfile.sh +./XI_DiagnosticProfile.sh Support +``` + + +## Importing +To prevent errors or misconfigurations, you should import your configurations in an useful order. We recommend importing in the following order: + +Commands -> Time Periods -> Contact Templates -> Contacts -> Contact Groups -> Host Templates -> Hosts -> Host Groups -> Service Templates -> Services -> Service Groups + +Or, as root, assuming you're in /nagios/etc: + +``` +cp commands.cfg timeperiods.cfg contacttemplates.cfg contacts.cfg contactgroups.cfg hosttemplates.cfg /usr/local/nagios/etc/import +/usr/local/nagiosxi/scripts/reconfigure_nagios.sh +cp hostgroups.cfg hosts/*.cfg /usr/local/nagios/etc/import +/usr/local/nagiosxi/scripts/reconfigure_nagios.sh +cp servicetemplates.cfg /usr/local/nagios/etc/import +/usr/local/nagiosxi/scripts/reconfigure_nagios.sh +cp servicegroups.cfg services/*.cfg /usr/local/nagios/etc/import +/usr/local/nagiosxi/scripts/reconfigure_nagios.sh +``` diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cc24141 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +api.sh.gz: api.sh + gzip -9 --keep api.sh + chmod 644 api.sh.gz + scp api.sh.gz ssd:eloyd/ + +nagios: + gzip -9 --keep nlog + scp nlog root@192.168.1.19:/usr/local/bin/nlog