Nagios .cfg Creation & Deployment Scrips

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
0oMo0
Posts: 1
Joined: Wed Apr 25, 2018 2:25 am

Nagios .cfg Creation & Deployment Scrips

Post by 0oMo0 »

hi everyone i have used CORE for a few years though not joined the forum till now, the company i work for is in the process of moving to XI, though i must admit i almost prefer core... during my time of using core i created many "batch" files to automate the creation of configuration files for Windows Servers. since were moving to XI these are no longer needed so i thought i would share them with you all. All scripts I created are for use with Core/Nagios3 though could easily be updated for Core/Nagios 4 etc.


the batch files i created are as follows

0. Install Nagios.bat (uses PStools to install NS Client++ on a single PC or Server)
01. Install Nagios from server list.bat (uses PStools to install NS Client++ on a list of PC's or Servers) accompanying installnagios.bat for install + it creates a cfg file for all of the servers as well by referencing 9.autobasic
1. Nagios Monitoring FULL CFG creator (like a wizard, prompts you to create a CFG file for a windows server with easy prompts and options)
2. Ping Only Nagios CFG Creator (creates a cfg to ping a server only)
9. autobasic (is referenced from 01 or it can be run separately, it creates an automated cfg file that checks for and monitors ALL disks on the server + CPU, RAM, VRAM, PING,

to work for the install scripts PSTools must be located in C:\tools\pstools
if installing from server list a text file called servers.txt will need to be created in C:\Nagios_Scripts containing the server names
the scripts write to C:\Nagios_Scripts\Logs for the log file
.cfg files will be output to C:\Nagios_Scripts\created_CFGs
the install files are referenced from C:\Nagios_Scripts\install_files in this folder have the nagios3-x86.msi, nagios3-x64.msi, nsclient.ini, installNAGIOS.bat (these directories must exist and files must be named as shown)
run the install scripts as an administrator or the deployment will fail.

I've added a ZIP file with all the batch files and folder structure. :)

any questions feel free to ask :D all feedback welcome... enjoy!!
Attachments
Nagios_Scripts.zip
contains all the files and folders mentioned, just add your own nsclient.ini and install msi files for
(8.84 KiB) Downloaded 151 times
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios .cfg Creation & Deployment Scrips

Post by tmcdonald »

Thanks for sharing!

The best place to upload these would be https://exchange.nagios.org which is where people go to find new plugins, wizards, addons, and more.

As this forum is for technical support I will be closing this thread now, but please do feel free to upload your scripts to our Exchange for greater visibility.
Former Nagios employee
Locked