Unfortunately along the way I found that for a non-Linux person like me it left some of the installation steps for me to stumble through. I don't know linux at all, so some of the below may be obvious, but it wasn't to me so I included everything I could. This includes adding in WMI for agentless checks :)
Very important to follow the steps to the T, as a lot of this has prerequesites. Remember CaSE SensiTiVE (if you don't use the right case on some of the setup then an error can occur that requires digging in config files to fix)
NOTE: For logging out of opsview I found that I couldn't with IE v9, the screen was flaky. But, I could with Firefox. On the flip side of that I found that editing the Nagvis maps SUCKED in Firefox, but worked great in IE v9. HAHA, have fun.
I did this with the Opsview Core Appliance v4.4
- Import the appliance
- Log into the appliance with conf / conf
- 'sudo su' to get to root access
- Change the IP address with netconf
- use 'passwd' to change the password of conf
- Download the gadgets you want and install (download from the link in the spiceworks guide)
- extract the contents
- Use winscp.exe and login with the conf user
- copy all the gadget files to the conf users directory
- go to the opsview appliance console and ensure you're at root still
- run the following:
- cp /home/conf/scale_thermometer.php /user/local/nagios/nagvis/nagvis/gadgets/
- cp /home/conf/rawWords.php /user/local/nagios/nagvis/nagvis/gadgets/
- cp -r /home/conf/rawWords /user/local/nagios/nagvis/nagvis/gadgets/
- Skip the section about Installing the opsview Agent Install, remember we're going agentless with WMI!
- Now we need to install WMI options
- First we need autoconf, Type 'apt-get install autoconf'
- Next we need C Compiler, Type 'apt-get install gcc'
- Now we need WMI (http://www.edcint.co.nz/checkwmiplus/InstallationTerminalSession)
- type 'cd /tmp/'
- 'wget www.edcint.co.nz/checkwmiplus/wmi-1.3.14.tar.gz'
- 'tar xzvf wmi-1.3.14.tar.gz'
- cd wmi-1.3.14
- make
- Now we test WMI
- wmic -U computername/administrator%adminpassword //computername "select * from Win32_ComputerSystem"
- You should get WMI info back on that system.
- Now we'll install check_wmi_plus.pl to the nagvis location (so that it shows in the dropdown list)
- cd /usr/local/nagios/libexec
- wget http://edcint.co.nz/checkwmiplus/sites/default/files/check_wmi_plus.v1.54.tar.gz
- tar xzvf check_wmi_plus.v1.54.tar.gz
- Reset permissions: (remember, I'm not that great at linux, so probably a better way to do this)
- chmod -R 555 check_wmi_plus*
- chown -R nagios check_wmi_plus*
- chgrp -R nagios check_wmi_plus*
- ls -la check_wmi_plus.* (shows the permissions)
- Now we need some extra CPAN modules (Perl) otherwise we'll see "Can't locate Number/Format.pm" with the nagios plugins and other like errors. This may not all be required, idk.
- cpan Statistics::Basic
- cpan Config::IniFiles
- yes anytime it prompts
- cpan Module::Build
- yes anytime it prompts
- cpan (to get to cpan shell)
- force install DateTime
- yes anytime it prompts
- q (to quit cpan shell)
- cpan Getopt::Long
- cpan Data::Dumper
- cpan Scalar::Util
- cpan Number::Format
- cpan ExtUtils::Config
- cpan ExtUtils::Helpers
- cpan ExtUtils/InstallPaths
- cpan TAP::Harness::Env
- cpan Module::Build::Tiny
- cpan Package::Stash
- yes anytime it prompts
- cpan CLass::Load
- cpan Storable
- Now we can test :)
- /opt/nagios/bin/plugins/check_wmi_plus.pl -m checkcpu -H computername -U computername/administrator -P password
- Run it again. Should get cpu average on second run.
- Cleanup!
- rm check_wmi_plus.v1.54.tar.gz
- cd /
- cd /tmp/
- rm cwpss_checkcpu_SMonitor___.state
- Open opsview
- login to opsview with admin / initial
- In the top right corner click admin
- Change the Admin password (note: I found that Firefox works best for opsview)
- Go to Settings - Service Checks
- Click + to add
- We'll do a test for Average CPU Utilization
- Name: Average CPU Utilization
- Server Group = enter a new one called "OS - Windows Agentless WMI" or whatever you want to group your WMI checks by.
- Check Period: 24x7
- Plugin: check_wmi_plus.pl
- Arguments: -H $HOSTNAME$ -m checkcpu -u %WINCRED:1% -p %WINCRED:2%
- Submit
- Go to Settings - Attributes
- Click + to add
- Name: WINCRED
- Default Value: leave blank
- Default Arg1: USERNAME
- Default Arg2: PASSWORD
- Submit
- Go to Settings - Host Templates
- CLick + to add
- Name: Windows Agentless
- Monitors tab
- Drill into "OS - Windows Agentless WMI"
- Select the Average CPU Utilization (green +)
- Submit
- Go to Settings - Hosts
- Add Host
- Enter hostname, title
- Change Icon
- Host Templates: Windows Agentless and click the arrow to add it.
- Go to Attributes tab
- Click the grey +
- Select WINCRED
- Click the Eye icon
- Value: none
- Check arg1: Enter domain/username (example computername/administrator or domainname/username)
- Check arg2: Enter the password (remember no special meta characters unless you escape them, ie !)
- Submit
- Settings - Apply Changes
- Reload Configuration
- Monitoring - Hosts
- Click your new host
- Click the Mass Re-Checks icon in top left
- Toggle all checkboxes - Submit
- Do the mass re-checks again.
- Should show your cpucheck (or error if you missed a step / got your username or password wrong)
- Now you can add the rest of your WMI checks!
- http://mastermonsvr.smartmon.com.au/mp-bin/public/public.cgi?mode=public&mode2=showplugindetails&plugin=check_wmi_plus.pl
- http://www.edcint.co.nz/checkwmiplus/?q=MakePerfRawDataClassCheck
- https://wmie.codeplex.com/
- Now you can do your other steps with ease since you know a little Linux :)
- Copy your nagvis map as described in Spiceworks post (and icons)
- Back to Winscp.exe
- Once again copy your jpg to the conf home
- While your at it unzip the Icon that Jamin289 posted and drop them into the conf home
- I unzipped to a folder named blocks and thin_blocks and copied those folders to the conf home
- Back to Putty to copy them to the proper location (doing them to these locations allows them to populate the opsview dropdown lists)
- cp /home/conf/NagvisLayout.jpg /usr/local/nagios/nagvis/nagvis/images/maps/
- cp -r /home/conf/blocks/* /usr/local/nagios/nagvis/nagvis/images/iconsets/
- cp -r /home/conf/thin_blocks/* /usr/local/nagios/nagvis/nagvis/images/iconsets/
- Apply Changes
- Reload Configuration
- Load the Nagvis map
- Modules - Nagvis
- Edit Current Map
- Right click in the text area and select Manage - Maps
- Under the "Create Map" area
- Name Map
- User with read Permissions: EVERYONE
- User with write Permissions: EVERYONE
- Map Iconset: Select Blocks or Thin_Blocks
- BackGround: Select NagvisLayout.jpg
- Click on your new map and begin loading the iconsets
- Edit Current Map
- Right click - Add Object - Icon - Service
- Select Host_name and service_description
- Place it where you want it.
- Save
- Continue as you desire with the guide from Jamin289
Don't forget to donate if you like what they've done to get you WMI. http://www.edcint.co.nz/checkwmiplus/?q=donations_and_sponsorship
No comments:
Post a Comment