05.02.2013 Views

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>opsi</strong> <strong>manual</strong> <strong>opsi</strong> <strong>version</strong> <strong>4.0.2</strong><br />

160 / 193<br />

check_<strong>opsi</strong> -H configserver.domain.local -P 4447 -u monitoring -p monitoring123 -t checkPluginOnClient --plugin "C:\\\<br />

<strong>opsi</strong>.org\\nagiosplugincol\\check_win_disk.exe C:" -c client.domain.local<br />

This call checks the client client.domain.local. At the client the plugin check_win_disk.exe is called with the<br />

parameter C:. This means, that the hard drive with the letter C should be checked. The output and the result value<br />

of the plugin will be fetched by the <strong>opsi</strong>clientd and will be given back to the Nagios server (via the <strong>opsi</strong> server) in a<br />

for Nagios correct format.<br />

Another special feature is to hold the last check results, even if the client is not reachable.<br />

This feature was implemented according to the fact that desktop clients not always are running like servers, but the<br />

most time in their life are usually switched off. Normally Nagios will show for switched off clients the result Unknown.<br />

In fact the most problems on the monitored clients will not disappear by just switching them off and on again. So<br />

the information that a client had a problem before it was switched off may be an essential information for the system<br />

administrator. (You may try to solve this problem by using Timeperiods at the Nagios configuration, but we think<br />

that this is not flexible enough and leads to a permanent configuration work). So this <strong>opsi</strong> extension give you the<br />

possibility to give back the last real check results if the client is not reachable right now.<br />

In order to use this feature, you have to use the Nagios macros $SERVICESTATEID$ and $SERVICEOUTPUT$.<br />

$SERVICESTATEID$ gives the last result value and should be passed to the -s Option. $SERVICEOUTPUT$ gives the<br />

last output line and should be passed to the -o Option. So check can give these last values instead of Unknown if the<br />

client is not reachable.<br />

check_<strong>opsi</strong> -H configserver.domain.local -P 4447 -u monitoring -p monitoring123 -t checkPluginOnClient --plugin "C:\\\<br />

<strong>opsi</strong>.org\\nagiosplugincol\\check_win_disk.exe C:" -c client.domain.local -s $SERVICESTATEID$ -o $SERVICEOUTPUT$<br />

20.5 <strong>opsi</strong> monitoring configuration<br />

This chapter focuses on the configuration that have to been made for a working interface between the <strong>opsi</strong> and the<br />

Nagios server. Just see this as a recommendation, there will be a lot of other ways to do the job.<br />

This description uses a Nagios server as monitoring server. On a Icinga server it should work very similar but you<br />

have to change some path entries. It should also work on other Nagios derivatives but this is not tested.<br />

Tip<br />

The configurationfiles from these Chapter are in <strong>opsi</strong>-nagios-connector-utils svn-Repository. To get these example configurationfiles<br />

you can connect over a browser to following url:<br />

https://svn.<strong>opsi</strong>.org/listing.php?repname=<strong>opsi</strong>-nagios-connector-utils<br />

or you can make a direct checkout from repository with following command:<br />

svn co https://svn.<strong>opsi</strong>.org/<strong>opsi</strong>-nagios-connector-utils<br />

20.5.1 <strong>opsi</strong> monitoring user<br />

In monitoring environments you will often find that the access is just restricted by IP numbers. Because of the lack<br />

of security of this solution we decided to work with a real user / password security in this <strong>opsi</strong> extension.<br />

Using the <strong>opsi</strong> standard group <strong>opsi</strong>admin would give the Nagios more rights than needed. So you have to create an<br />

own <strong>opsi</strong> user for the <strong>opsi</strong>-Nagios-Connector.<br />

In the following example a user named monitoring with the password monitoring123 is created for <strong>opsi</strong>:<br />

<strong>opsi</strong>-admin -d method user_setCredentials monitoring monitoring123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!