Bad interpreter No such file or directory error in Nagios

This article covers Nagios error, 'bad interpreter no such file or directory'. Nagios bad interpreter: No such file or directory error occurs after uploading a plugin which is in a "Windows" format instead of a "Unix" format. It has to do with the line endings / carriage returns.

To fix this error, you will convert the file to a Unix format:

$ yum install -y dos2unix
$ dos2unix /usr/local/nagios/libexec/check_apc_pdu_load.sh

Read More




Define Global Environment Variables in Nagios - Fix it Now

This article covers how to define Global Environment Variables in Nagios. In some environments, when the plugin is executed by the monitoring engine, these environment variables are not loaded and hence the plugin does not know where to find them and fails.

Therefore, when the plugin is executed, environment variables may not load.


To Define Global Environment Variables in Nagios:

Here, you will define variables required for you plugins globally.

a. Add the path /usr/local/important_application to the PATH environment

b. Add the variable ORACLE_HOME=/usr/lib/oracle/11.2/client64

1. To do this, edit a specific file that nagios checks when it starts:

$ vi /etc/sysconfig/nagios

2. Add the following lines to the file and then save:

export PATH=$PATH:/usr/local/important_application
export ORACLE_HOME=/usr/lib/oracle/11.2/client64

3. Finally, restart Nagios:

$ systemctl restart nagios.service


If you have Mod-Gearman, 

The following is being applied:

a. Re-define the PATH environment to include /usr/local/important_application

b. Add the variable ORACLE_HOME=/usr/lib/oracle/11.2/client64

1. This is performed by editing a specific file that mod-gearman2-worker checks when the service starts:

/etc/sysconfig/mod-gearman2-worker

2. Open an SSH session to your Mod-Gearman worker.

Type:

$ vi /etc/sysconfig/mod-gearman2-worker

3. Add the following lines to the end of the file and save:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/important_application
ORACLE_HOME=/usr/lib/oracle/11.2/client64

4. Now reload the daemons and restart the Mod-Gearman worker:

$ systemctl daemon-reload
$ systemctl restart mod-gearman2-worker.service

Read More




Using WebMatrix – Create and publish websites with ease

This article covers WebMatrix which is a simple and free development tool to create, customize, publish and maintain websites with ease. WebMatrix is basically a free, lightweight, cloud-connected web development tool that enables you to create, publish and maintain your websites with ease. You can use it to create HTML5/CSS3 compliant websites, with LESS and Sass support, and code completion for JavaScript and jQuery.

Also, You can develop using ASP.net, PHP and Node.js with context sensitive code completion.

WebMatrix lets you work seemlessly with various databases, viz. SQL CE, Sql Server and MySQL. Creation of databases and modification of schema and data are as simple as it gets. 

Also, WebMatrix provides a straightforward path to migrate databases, for example, migrating a SQL CE database to a SQL Server database.

Publishing these databases is also handled for you by the product so long as you use a WebDeploy publish profile to publish your website.

Read More




Cannot download Docker images behind a proxy - Fix it Now

This article covers the error, Cannot download Docker images behind a proxy. 

You can fix this docker issue by doing the following:

1. In the file /etc/default/docker, add the line:

export http_proxy='http://<host>:<port>'

2. Restart Docker:

$ sudo service docker restart


Also, you can Follow the steps given below to fix this docker error:

1. Create a systemd drop-in directory for the docker service:

$ mkdir /etc/systemd/system/docker.service.d

2. Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf and add the HTTP_PROXY env variable:

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"

3. If you have internal Docker registries that you need to contact without proxying you can specify them via the NO_PROXY environment variable:

Environment="HTTP_PROXY=http://proxy.example.com:80/"
Environment="NO_PROXY=localhost,127.0.0.0/8,docker-registry.somecorporation.com"

4. Flush changes:

$ sudo systemctl daemon-reload

5. Verify that the configuration has been loaded:

$ sudo systemctl show --property Environment docker
Environment=HTTP_PROXY=http://proxy.example.com:80/

6. Restart Docker:

$ sudo systemctl restart docker

Read More




Boot an EC2 Windows instance into DSRM - How to perform this task

This article covers how to boot an EC2 Windows instance into DSRM. If an instance running Microsoft Active Directory experiences a system failure or other critical issues you can troubleshoot the instance by booting into a special version of Safe Mode called Directory Services Restore Mode (DSRM). In DSRM you can repair or recover Active Directory.


How to Configure an Instance to Boot into DSRM?

1. To boot an online instance into DSRM using the System Configuration dialog box

i. In the Run dialog box, type msconfig and press Enter.

ii. Choose the Boot tab.

iii. Under Boot options choose Safe boot.

iv. Choose Active Directory repair and then choose OK. The system prompts you to reboot the server.


2. To boot an online instance into DSRM using the command line

From a Command Prompt window, run the following command:

$ bcdedit /set safeboot dsrepair

If an instance is offline and unreachable, you must detach the root volume and attach it to another instance to enable DSRM mode.

Read More




SQL error 300 - Fix it Now

This article covers tips to resolve SQL error 300. The reason of the error is related with user permission on VIEW SERVER STATE. You can upgrade SQL Server Management studio with the same version like SQL Instance or higher. 


Also, To mitigate this error, give the following GRANT and the error message will disappear:

USE master
GO
GRANT VIEW SERVER STATE TO "LoginName"

Read More





Focus on your business, not your servers.

Click Here to Learn More




Recent Post