Tag Archives: CentOS

Citrix – Making CentOS Look Like Windows 10

Citrix – Making CentOS Look Like Windows 10

As part of my testing with the CVAD 1912 Linux VDA I came across the B00merang desktop themes which makes a Linux desktop look like Windows 10. I decided to explore whether the theme could be applied to Citrix sessions and after to some googling, got it up and running .

Continue reading Citrix – Making CentOS Look Like Windows 10

Citrix – Learning About The Linux VDA

Citrix – Learning About The Linux VDA

As part of taking the new Citrix Virtual Apps and Desktops (CVAD) LTSR release out for a spin, today I decided to look at the Linux VDA again.  It’s been a while since I tried it as my previous attempts weren’t successful but today I figured was the day to try again !

Many years ago I worked on a Citrix install for a school in Hull which used XenApp on Sun Solaris to provide Open Office to their students at home for doing their homework.  At the time I was greatly impressed but after putting a XenApp server on Solaris in for one of the previous companies I worked for, I haven’t seen anything *nix related since.

Continue reading Citrix – Learning About The Linux VDA

Nagios CentOS Remote 2 – Configuring The Nagios Server

Nagios CentOS Remote 2 – Configuring The Nagios Server

The next part in the installation is to configure the nagios server to monitor the remote host.  To configure the nagios server to monitor the remote server perform the following sections.

Confirming Communiction With The Client

The first step in the nagios server configuration is to confirm that it is able to communicate with the remote host.  To confirm communications with the remote host perform the following steps :-

  • In the command prompt on the nagios server execute the following command :-

/usr/lib64/nagios/plugins/check_nrpe -H {Remote Host IP}

E.G. – /usr/lib64/nagios/plugins/check_nrpe -H 10.20.30.40

  • The command will execute and if it is able to communicate with the client machine return something along the lines shown below :-

NRPE v2.12
N.B. The version number shown may be different if a newer version of nrpe has been installed on the remote host

Defining The Host

The next part of the configuration is to define the host to nagios.  To define the host to nagios perform the following steps :-

  • On the nagios server create a new file under/etc/nagios/objects named linux-servers.cfg
  • Edit the newly created file /etc/nagios/objects/linux-servers.cfg and add the text below :-

define host {
 use linux-server
 host_name {Remote Server FQDN Hostname}
 alias {Friendly Remote Server Name}
 address {Remote Server IP Address}
 }

  • Next add in the following text below to create a basic Ping check of the server :-

define service {
 use local-service
 host_name {Remote Server FQDN Hostname}
 service_description check_ping!100.0,20%!500.0,60%
 }

  • Save and Exit the file

Adding The Config File To The Nagios Config File

In order for nagios to utilise the newly created linux-servers.cfg created in the section above it needs adding to the nagios.cfg on the nagios server.  To add the linux-servers.cfg file to the nagios.cfg file perform the following steps: –

  • On the nagios server edit the file under /etc/nagios/nagios.cfg
  •  Locate the line cfg_file=/etc/nagios/objects/localhost.cfg and then add the text below as a new line :-

cfg_file=/etc/nagios/objects/linux-servers.cfg

  • Save and  Exit the file

Adding The Check_nrpe Command

In order to run commands on the remote host the check_nrpe command needs to be defined on the nagios server.  To define the check_nrpe command on the nagios server perform the following steps :-

  • On the nagios server edit the file/etc/nagios/objects/commands.cfg
  • At the bottom of the file add the section of text below :-

define command {

 command_name check_nrpe

 command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

 }

  • Save and Exit the file

Verify The Configuration And Restart Nagios

The next step is to verify that the changes in the previous sections have been made correctly on the server.  To verify the nagios configuration changes perform the following steps :-

  • In the command line of the remote host execute the command below :-

nagios -v /etc/nagios/nagios.cfg

  • The command should return the lines below if the files have been written correctly :-

Total Warnings: 0

Total Errors:   0

Things look okay – No serious problems were detected during the pre-flight check

  • Finally Restart nagios on the server by executing the command below :-

service nagios restart

Nagios CentOS Remote 1 – Installing The Client Components And Dependencies

Nagios CentOS Remote 1 – Installing The Client Components And Dependencies

The first part of the configuration to add a remote CentOS server to Nagios for monitoring is to install the client components and any dependencies using yum.  To install the client components and any dependencies perform the following steps :-

  • In the command line on the Remote Host execute the following command :-

yum install nagios nagios-plugins nagios-plugins-nrpe nagios-nrpe

The command above will install Nagios and some or all of the additional dependencies listed below on to the server once you accept the install :-

fping
perl-Crypt-DES
perl-Digest-HMAC
perl-Digest-SHA1
perl-Net-SNMP
perl-Socket6

Depending on the initial build of the CentOS server then some of these dependencies may not be required or may require updating as part of the yum install process.

Setting The Nagios Account Password

The next step is to set the password for the nagios user account on the Remote host as the CentOS installation already creates the account as part of the instalation.

The nagios user is used to run the nagios client components on the remote host itself but also for connection from the monitoring server.  To set the password for the nagios user perform the following steps :-

  • In the command line on the Remote Host execute the following command :-

passwd nagios

  • When prompted set the password for the user to the desired password.

Editing The Nrpe Config File

The next step in configuring the client components of nagios on the remote host is to modify the nrpe.cfg file on the server.  To modify the nrpe.cfg file on the server perform the following steps :-

·         On the Remote Host edit the file /etc/nagios/nrpe.cfg ·         Locate the line below and uncomment it by removing the # (Hash) symbol from the front of the line

#server_address=127.0.0.1
E.G. – server_address=10.20.30.40

·         Next change it to the IP address on the server you wish to bind nrpe to if you do not wish nrpe to run on all interfaces :-

server_address=127.0.0.1
E.G. – server_address=10.20.30.40

·         Next locate the line below and comment it out by adding a # (Hash) symbol to the front of the line :-

allowed_hosts=127.0.0.1
E.G. – #allowed_hosts=127.0.0.1

·         Next add a line below this as shown below where the {Monitoring Server IP} is set to the IP address of your nagios monitoring server :-

allowed_hosts={Monitoring Server IP}
E.G. – allowed_hosts=10.20.30.50

·         Next locate the line below and change it to dont_blame_nrpe=1 :-

dont_blame_nrpe=0
E.G. – dont_blame_nrpe=1

·         Next locate the INCLUDE CONFIG FILE section of the file and add the line below :- include=/etc/nagios/command-plugins.cfg ·         Save and Exit the file

Configuring The Nrpe Daemon To Start Automatically

The next step is to configure the nrpe daemon on the remote host to start automatically on boot.  To configure the nrpe daemon on the remote host to start automatically on boot perform the following steps :-

·         In the command line on the Remote Host execute the following command :-

chkconfig nrpe on

Starting The Nrpe Daemon

The final step on the Remote Host is to start the nrpe daemon and to do this perform the folliowing steps :-

·         In the command line on the Remote Host execute the following command :-

service nrpe start

Nagios CentOS Remote – Introduction And Pre-Requisites

Nagios CentOS Remote – Introduction And Pre-Requisites

Introduction

Nagios is an open source monitoring solution for network devices and servers.  The following pages of this article explain how to configure a remote CentOS server as a Nagion client for monitoring.

The installation is broken down in to the following steps which are explained in the subsequent sections of this article :-

  1. Installing The Client Components And Dependencies
  2. Configuring The Client Components
  3. Adding The Remote Host To Nagios

Pre-Requisites

In order to install the Nagios client components on to a CentOS 5.5 server the following pre-requisites must be met :-

  • A base installation of CentOS 5.5

Nagios CentOS 4 – Checking And Starting Nagios

Nagios CentOS 4 – Checking And Starting Nagios

The final step in the installation is to verify the configuration of nagios and then configure the daemon start up on the server.  To verify the configuration of nagios and then configure the daemon start up on the server perform the following steps :-

Verifying The Nagios Configuration

Once the nagios configuration steps have been done in the previous article the next step is to verify it.  Nagios proivides the ability to verify the configuration prior to starting or restarting nagios and it is good practice to perform this.  To verify the configuration of nagios perform the following step :-

  • In the command line of the nagios server execute the command below :-

nagios -v /etc/nagios/nagios.cfg

  • The command should return the lines below if the files have been written correctly :-

Total Warnings: 0
Total Errors:   0
Things look okay – No serious problems were detected during the pre-flight check

Configuring The Nagios Daemon To Start Automatically

Once the configuration has been verified the next step is to configure the nagios daemon to start automatically on boot and to do this perform following step :-

  • In the command line execute the command below :-

chkconfig nagios on

Starting Nagios

The final step in the installation is to start nagios on the server and to do this perform following step :-

  • In the command line execute the command below :-

service nagios start

Checking Nagios Is Running

To check that nagios is now running on the server perform the following steps :-

  • Open a web browser on a client machine (Remember to use one in a subnet which you have granted access from if you locked down access in the previous article)
  • In the web browser go to http://{Nagios Server IP Address}/nagios/
  • When prompted enter in the username and password which you set up in the previous article
  • You should now be presented with the Nagios front page
  • Click on Hosts in the left hand pane and you should see localhost
  • Click on Services and you should be presented with the list of default services on the localhost which nagios is monitoring

Nagios CentOS 3 – Setting Up Nagios

Nagios CentOS 3 – Setting Up Nagios

The next part of the installation is to set up Nagios ready for use which includes the following steps :-

  1. Setting up the password file
  2. Configuring the CGI file
  3. Configuring the nagios.cfg file

Setting Up The Password File

The first step in setting up Nagios is to create the password file which will be used to control access to the system.  To create the password file perform the following steps :-

  • In the command prompt execute the following command :-

htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

  • When prompted enter the password desired for the nagiosadminuser
  • When prompted confirm the password for the nagiosadmin user

Configuring The CGI File

The CGI file is already configured for the use of the user nagiosadmin following installation so there is nothing to change if using the default nagiosadmin user.

If you are using a different username then perform the following steps :-

  • Edit the file /etc/nagios/cgi.cfg and replace all references to thenagiosadmin user with the username configured in the password file
  • Check and confirm that the setting below is set to 1 :-

use_authentication=

  • Save and Exit the file

Configuring The Nagios.cfg File

As with the CGI file, the nagios.cfg file is already configured for a basic installation.

The contents of the nagios.cfg file will be covered in subsequent articles as they are too in depth for this article.

Nagios CentOS 2 – Configuring The Nagios Apache File

Nagios CentOS 2 – Configuring The Nagios Apache File

The next part of the installation is to edit the nagios.conf file for Apache on the server.

The modifications below are to lock down access to Nagios as the default configuration is to allow from all.  If you are not worried about locking down access to the Nagios web-site to only specified subnets then skip this section.

To edit the nagios.conf file on the server perform the following steps :-

Edit the file /etc/httpd/conf.d/nagios.conf

  • Locate the section <Directory “/usr/lib/nagios/cgi”>
  • Search for the line below and comment out using a # (Hash) sign at the start of the line :-

Allow from all

E.G. – #Allow from all

  • Next find the line below and uncomment the line by removed the # (Hash) sign at the start of the line :-

#Allow from 127.0.0.1

E.G. – Allow from 127.0.0.1

  • Next change the local host IP address 127.0.0.1 to the IP subnet you wish to allow access to Nagios from

Allow from 127.0.0.1

E.G. – Allow from 10.20.30

  • Next locat the section <Directory “/usr/share/nagios”>
  • Search for the line below and comment out using a # (Hash) sign at the start of the line :-

Allow from all

E.G. – #Allow from all

  • Next find the line below and uncomment the line by removed the # (Hash) sign at the start of the line :-

#Allow from 127.0.0.1

E.G. – Allow from 127.0.0.1

  • Next change the local host IP address 127.0.0.1 to the IP subnet you wish to allow access to Nagios from

#Allow from 127.0.0.1

E.G. – Allow from 10.20.30

  • Save and exit the file

Reloading The Apache Configuration

Once the nagios.conf has been modified Apache will need to be reloaded.  To reload the Apache configuration perform the following steps :-

  • In the command line execute the following command :-

service httpd reload

Nagios CentOS 1 – Installing Nagios And Its Dependencies

Nagios CentOS 1 – Installing Nagios And Its Dependencies

The next step is to install Nagios and its dependencies on to the server using yum.  To install Nagios using yum perform the following step :-

  • In the command line execute the command below :-

yum install nagios nagios-devel nagios-plugins nagios-plugins-nrpe


The command above will install Nagios and some or all of the additional dependencies listed below on to the server once you accept the install :-

fping
icinga
perl-Crypt-DES
perl-Digest-HMAC
perl-Net-SNMP
perl-Socket6

Depending on the initial build of the CentOS server then some of these dependencies may not be required or may require updating as part of the yum install process.