15

Windows: Agentless Monitoring with Opsview

  • Upload
    opsview

  • View
    1.291

  • Download
    4

Embed Size (px)

DESCRIPTION

This ‘how to’ presentation describes how to set up agentless monitoring for Windows in Opsview V4.

Citation preview

Page 1: Windows: Agentless Monitoring with Opsview
Page 2: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence 2

Windows: Agentless Monitoring using Opsview

Page 3: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence3

About• This ‘how to’ presentation describes how to set up agentless monitoring

for Windows in Opsview V4. • To obtain a copy of Opsview visit our website and download

Opsview Core (free) or Opsview Pro (30 day trial).

Page 4: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence4

Pre-requisites• We need to install an open source WMI Client, as previous versions

(Ubuntu packaged .deb versions of WMI-Client, for example) do not work with newer versions of Windows (2008, 7, etc).

• We also need to install the check_wmi_plus.pl script, which requires some configuration, along with some modules via CPAN/APT.

Page 5: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence5

Background Information• In the example environment used for this setup, we have a Ubuntu 10.04

x64 server, however aside from the plugins/packages downloaded by APT (which can be downloaded via alternatives package managers) the steps are nearly identical.

Page 6: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence6

Background Information

Page 7: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence7

Installation• Firstly, we must install some pre-requisite packages on our server. These

are “gcc”, “automake” and “DateTime.pm” (A perl module required):

sudo apt-get install autoconf gcc libdatetime-perl

• Once done, we will now install the underlying WMI client. Firstly, change directory to /home/user (or wherever you would like the config work to be done, however this is all relative).

Page 8: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence8

Installation• Once done, we will now install the underlying WMI client. Firstly, change

directory to /home/user (or wherever you would like the config work to be done, however this is all relative).

• Secondly, download the source from the link below and extract:

wget http://dev.zenoss.org/svn/trunk/inst/externallibs/wmi-1.3.16.tar.bz2

bunzip2 wmi-1.3.16.tar.bz2

tar -xvf wmi-1.3.16.tar cd wmi-1.3.16/

Page 9: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence9

Installation• Now we are in the wmi folder, we will need to set the location of our

“../bin/python” directory; in our case using Ubuntu, it is in /usr, so:

export ZENHOME=/usr

• This tells the program to look for /bin/python in /usr, i.e. /usr/bin/python (the fqdn).

• Next, we will need to edit “GNUmakefile” as below, and find and comment out / delete the line “USE_BREAKPAD=1”:

nano GNUmakefile

And comment out the line, so it looks like “#USE_BREAKPAD=1”.

Page 10: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence10

Installation• Next, we need to run “make” and the compilation will begin, this can take

up to 10 minutes.• Then we will need to move the newly created wmic into /bin, using the

command below:

cp /home/ubuntu/wmi/wmi-1.3.16/Samba/source/bin/wmic /bin

• Next we will need to install some Perl modules required:

perl -MCPAN -e shell

cpan>o conf urllist http://ppm.activestate.com/CPAN http://cpan.perl.org

cpan>o conf commit cpan>o conf prerequisites_policy follow

cpan>o conf commit cpan>install Config::IniFiles

Page 11: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence11

Installation• Once done, we will next need to download the check_wmi_plus plugin

and compile. To do this, we must first download and extract using the commands:

wget http://edcint.co.nz/checkwmiplus/sites/default/files/check_wmi_plus.v1.52.tar.gztar -zxvf check_wmi_plus.v1.52.tar.gz

• You should “cd ….” again to a suitable location to extract and work on the plugin. Once extracted, we will need to copy/rename the sample config, so we have a copy we are working on, as below:

cp check_wmi_plus.conf.sample check_wmi_plus.conf

• Once done, we will need to edit the new config using nano/vim etc:

nano check_wmi_plus.conf

Page 12: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence12

Installation• There are a few items we need to edit:• $base_dir="home/ubuntu/wmi/”; << This needs to be the folder where

we extracted wmi, i.e. where the folder “wmi-1.3.16” lives.• $wmic_command="/bin/wmic"; << This should be ok if you followed

instructions, as this is where we moved our newly compiled “wmic” to.• $wmi_ini_file='/home/ubuntu/wmi/check_wmi_plus.d/

check_wmi_plus.ini'; << This should be where the “check_wmi_plus.ini” file lives, normally within the extracted “check_wmi_plus.d” folder.

• $wmi_ini_dir="/home/ubuntu/wmi/check_wmi_plus.d/" << As above.• Once this file is edited and tailored per your system/install, we should be

almost ready to test. Finally, we need to edit the plugin itself and edit the value, so:

nano check_wmi_plus.pl my $conf_file='/home/ubuntu/wmi/check_wmi_plus.conf';

• To point to our newly created/edited config file at /home/ubuntu/wmi/

Page 13: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence13

Installation• So now we should have the wmic program downloaded and compiled, the

required Perl modules downloaded and installed, and the check_wmi_plus plugin downloaded, compiled and customised.

• We can test our plugin against a WMI enabled Windows machine (WMI enabled means someone has gone into the server, “start > run > services.msc (enter) >” scrolled down to “WMI Performance Adapter” and “started” it.

• To test, run a command similar to below:

root@devvm:/home/ubuntu/wmi# ./check_wmi_plus.pl -H 192.168.11.107 -u root -p opsview -m checkcpuOK (Sample Period 489 sec) - Average CPU Utilisation 6.69%|'Avg CPU Utilisation'=6.69%;

• Where “-H” is for host, “-u” is for user, and “-p” is for password. “-m” is the mode (“-s” is where we add the sub-mode). If the command works, you should see an output as above. If you do, congratulations your Opsview Server is now monitoring without an agent!

Page 14: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence14

Watch the Video!Want to find out more about Windows monitoring with Opsview? Check out our Webinar recording.

Page 15: Windows: Agentless Monitoring with Opsview

Wednesday 12 April 2023 © Opsview Ltd. Commercial in Confidence15

About OpsviewOpsview delivers a single unified view of the health of all your distributed physical, virtual and hybrid cloud systems.

We give DevOps staff all the tools they need to get their jobs done faster, easier and for less.

• Opsview Enterprise offers large enterprises (+100 devices) and MSPs a certified, professionally supported system with enhanced functionality such as dynamic dashboards and reports

• SMEs looking for feature-rich dashboards to monitor the performance of their on-premise, virtualized or cloud apps choose Opsview Pro

• Opsview Core is our free, open source monitoring tool - you can test and customize it how you want