Enable SSH VMware vRealize Operation Manager (vROps 6.x)

We have investigated our problem with VMware Support and they want run a query in Postgres database. Usually I use Putty for SSH connection, but before I could do this I should on the ssh on vROps:

  1. Open vROps Console and press “Alt+F1” to switch console
  2. Type “root” user
  3. In default vRealize root user hasan’t password
  4. Press enter for Old password and the promt will change New password
  5. Type new password and type again
  6. When we are able to login by root type: “chkconfig sshd on”
  7. Start service: “service sshd start”

Go back to Putty and connect to vRealize Operation Manager by ssh.

Disable directory browsing Apache2 Debian8

Change Apache config file. Defult config is here: “/etc/apache2/sites-available/000-default.conf”

You can see similar this, without text in red box:

Apache2_config

Add this text below to the config file:

<Directory “/var/www/html”>
Options Includes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Safe file

Restart Apache service

“sudo service apache2 restart”

Done!

You can test when create folders in root directory (in this eximple: /var/www/html) and try browsing this directory any web browser.

Apache2_disable_directory_browsing

You can see like this error message when you did everything well.

I hope this short article will help for You!

Exception processing request in Nagios

Error

I deployed a new server, after that installed NSClient++ 0.4.3 The process was simple, nothing new, install NSClient and copy nsclient.ini from other server where work that, and copy extra (not included in template) config in windows.cfg file from working server. I was little embrassed when see this message: Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option). NSClient_ErrorM_001 I tried version of 0.4.1 NSClient, but same symptomes.

Solution

In the nsclient.ini the part of this, can change “true” to “1”

[/settings/NRPE/server]
#allow arguments = true (original part)
allow arguments = 1

NSClient_ErrorM_002-Solution

Set Up Apache Virtual Host on Ubuntu 14.04 LTS

We have to install apache2 for own server

# sudo apt-get update
# sudo apt-get install apache2

Create new folder for site

# sudo mkdir -p /var/www/example.com/public_html

If you would like change permission you do that

# sudo chown -R $USER:$USER /var/www/example.com/public_html

 Add read access www folder

# sudo chmod -R 755 /var/www

Create a page

# sudo nano /var/www/example.com/public_html/index.html

Insert this text into index.html file:

<html>
<head>
<title>Welcome to
Example.com!</title>
</head>
<body>
<h1>Success! The
example.com virtual host is working!</h1>
</body>
</html>

You need create a Virtual Host file (in older version 000-default.conf was simple default file, but in the new version we have to use the new, and *.conf extension)

# sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf

Edit config file

# sudo nano /etc/apache2/sites-available/example.com.conf

In the simple config file we can see like this

Apach2ConfigFile

Apache2 default config file

Add new lines to config file, and if you want, delete comments.
“ServerName” is usually your domain name like in IIS hostheader
“ServerAlies” this is a alternative name, this help matching for example www a record
“DocumentRoot” is a place where you going to store your website (in this example index.html)

<VirtualHost *:80>

ServerAdmin admin@example.com
ServerName example.com
ServerAlias http://www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

We have to enable site

# sudo a2ensite example.com.conf

Restart service

# sudo service apache2 restart

After restart you will see something like this

* Restarting web server apache2
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message

Don’t worry, this is OK.

I checked my site on server

Edit host file, add you server’s ip address into host file

# sudo nano /etc/hosts

YOURIP example.com

Check: ping example.com, and if you getting answer, your host file settings are ready

# w3m example.com (w3m is a command line browser, i checked my site by this tool)

press “q” to quit from w3m browser

HTTPs check in Nagios error Invalid option – SSL is not available

When you want check https site with “./check_http –ssl google.com” command in Nagios, you may get this error “Invalid option – SSL is not available”

You will able to solve this problem, when you follow this instructions below:

# sudo apt-get install libssl-dev

(navigate to the directory that you have your nagios plugins extracted, Eximple: /home/install-username/nagios-plugins-2.0.3/)

# sudo ./configure –with-openssl=/usr/bin/openssl
# sudo make
# sudo make install
# sudo service nagios restart

Check plugin: go nagios libex folder (maybe there: cd /usr/local/nagios/libexec$)

# sudo ./check_http –ssl google.com
# HTTP OK: HTTP/1.0 302 Found – 524 bytes in 0.132 second response time |time=0.132414s;;;0.000000 size=524B;;;0

Add new Read Only User to Nagios Core

!!! Don’t forget make Snapshot or Backup from Your system !!!

I have used Ubuntu 14.04 and Nagios Core 4.0.8, and this steps worked, I tried!

# sudo htpasswd /usr/local/nagios/etc/htpasswd.users newusername
# /etc/init.d/apache2 reload

edit nagios cgi.cfg file, which located maybe here

# sudo nano /usr/local/nagios/etc/cgi.cfg

you will found this part in the cgi.cfg, and add next to it with comma

authorized_for_all_services=nagiosadmin,newusername
authorized_for_all_hosts=nagiosadmin,newusername

You have to restart nagios

# sudo service nagios reload

after reload you can able to login into nagios web page by newuser, and you have read only rights.