Getting status information of check_mysql-health command in Nagios Core - nagios

Am using the NagiosQL to configure the Nagios core, i have a problem with check_mysql_health plugin it is not returning status information in Nagios core but if run same command in command-line it is gives the proper result. Can anyone suggest me some solution for this?
Thanks
Somesh

Finally i got the solution for my problem, to get the status information in Nagios core we have to set the path of the check_mysql_health plugin in 4 different config files /etc/nagios/command-plugin.cfg - add the plugin path,/etc/nagios/nrpe.cfg - add the plugin path, /etc/nagiosql/commands.cfg - add the plugin path at command definition, /etc/nagios/objects/commands.cfg - define the command for check_mysql_health, and the Additional templates must be a generic templates in service panel of NagiosQL

Related

Drupal not recognized installation

Despite the complete installation of drupal 7.59, when I execute command drush cc all this message is displayed : No Drupal site found, only 'drush' cache was cleared., even I have installed a custom module in my site and I can work with my drupal site on localhost/my_site/ in browser, it's not recognaized as a Drupal site !!!
my main problem is that module is installed correctly but sql tables are not created in database and drush clear cache command doesn't help.
any one can help me what is wrong and why is this happening?
Thanks!
99% sure that path variable is wrong. Please check https://www.drupal.org/forum/support/post-installation/2014-05-14/drush-no-drupal-site-found-only-drush-cache-was-cleared
I'm not sure which OS you are using. Check path and port for mysql

Nagios Plugin Error: (No output on stdout) ... failed. errno is 2: No such file or directory

I am using custom Nagios plugins for the first time and am running into this error when I create a service for the plugin.
(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load.py, ...) failed. errno is 2: No such file or directory
The plugin works when I run it on the command line, however does not work when it runs within Nagios.
I followed these steps to get the plugin into Nagios
https://assets.nagios.com/downloads/nagiosxi/docs/Managing-Plugins-in-Nagios-XI.pdf
Here is what it looks like in the Nagios UI
The plugin is in the correct path: /usr/local/nagios/libexec and the resource.cfg file has the same path within it.
I tried two separate plugins, both which work on the command line, and the result is the same error.
The error indicates the file location is incorrect, however the plugin is in the specified directory and runs with no errors within that directory.
I am totally stumped and appreciate any help.
For anyone reading this, I solved the problem.
The first time I added the plugin, I forgot to add the python extension. When I updated the already created plugin, Nagios still threw the error.
Once I completely deleted the plugin and re-created it the 'file not found', error went away.
I faced a similar issue when I was trying to add a custom plugin ( I had custom plugins in ruby and python ).
The issue was the missing shebang line at the start of the script (which determines the script's ability to be executed like a standalone executable).
For example, if you have a python plugin custom-plugin.py then make sure this script has shebang at the start of script #!/usr/bin/env python3. Also if you have other scripts (ruby, bash etc.) make sure to add the appropriate path at the start of your scripts.
Also, check the path for plugins Nagios version. For my setup path was /usr/local/nagios/libexec/ and make sure your custom plugin is executable and has correct ownership permissions.
Sample custom template I used :
define command {
command_name check_switch_health
command_line /usr/local/nagios/libexec/check_snmp.rb --host $HOSTADDRESS$ --model "$ARG1$" --community "$ARG2$"
}
The above workaround worked for me.

From where nagios run custom plugins

I am using nagios 3.2 for monitoring. I have a custom plug-in which I have placed in...
/usr/local/nagios/libexec, for nagios monitoring.
My custom plugin reads a configuration file for functioning properly. and this configuration file should be in the same directory.
Form this directory(../nagios/libexec), I am able to execute the binary.
However when nagios try to run it, it is not able to read associated configuration file.
Troubleshooting tried:-
1.) I have given full privileges to both binary and configuration file
-rwsrwxrwx 1 root root 2102 Mar 7 04:53 ------.properties
-rwsrwxrwx 1 root root 2079462 Mar 6 12:03 binary
Please let me know if nagios run the custom plugin from any other directory?
or any other suggestion...
Thanks,
Ruchir
Check /usr/local/nagios/etc/resource.cfg $USER1$ variable. It points to plugin directory.
Does your plugin need any privileges to access an specific dir or something? Maybe nagios user doesn't have access to it, or you need to add nagios to sudoers.
So I am able to find out by replacing by plugin with a scripts that gives directory (PWD)
and find out that it is running nagios daemon from / (root) directory.
So I have placed my configuration file there and it worked.
Thanks everone for your suggestions!!!
What language is this plugin written in (this sometimes makes a difference in how the plugin will handle your environment vars)? Have you tried using the FULL path to your configuration file, in the plugin (not just "./conffile)? If you su to the Nagios user and attempt to execute said plugin (with config), does it work?

NoClassDefFoundError MimeTypeException with PDF extraction

I am getting an exception trying to use update/extract with PDF files
My Set up is:-
Ubuntu Server 11.10
Tomcat 6
Solr 3.5.0.2011.11.22.15.54.38
I can browse to solr/admin OK
I have put all the contrib/extract and apache-solr-cell3.5.0.jar libraries into the tomcat folder webapps/solr/WEB-INF/lib
I am calling extract using:-
curl "http://localhost:8080/solr/update/extract?uprefix=attr_&fmap.content=attr_content&commit=true" -F "file=/path/to/my.pdf"
error is
java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:383)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:461)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:248)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:239)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
Would appreciate any pointers - the only time this error seems to come up elsewhere is with Nutch and cached results.
I have tried sending the mimetype in the querystring and also a *.doc file but got the same error.
According to the error message it is not a MimeTypeException exception you get: The problem is a NoClassDefFoundError, because Solr cannot load the class MimeTypeException.
Normally this class is present in tika-core.jar.
Make sure you actually have that file and also check if you have a lib statement in your solrconfig.xml pointing to the right directory.
This was due to the basic error of copying the necessary tika libraries (to tomcat6/webapps/solr/WEB-INF/lib) but leaving ownership of the jar files as ROOT instead of chown-ing them to TOMCAT6. After setting the right permission and restarting Tomcat it started working OK
Found the solution of this problem, I was using SolrJ to update my pdf indexing.
after deploy solr to tomcat, I didn't include the following libraries into the tomcat/webapp
and I get all the lazy loading problem, etc etc
I even try to get apache tika...
until I do this...
shutdown tomcat
\apache-solr-3.5.0\contrib\extraction
copy the libraries above to below
\apache-tomcat-7.0.26\webapps\solr\WEB-INF\lib
startup tomcat
cheers

Ushahidi No Input File Specified

I have been trying to install Ushahidi platform for weeks but without any luck. I recently started over using Ushahidi latest release ushahidi-Ushahidi_Web-2.0.1-140-g0991172.zip and extracted it to folder ushahidi under my root.
I am using godaddy Linux server. I have tried both the manual and wizard to setup Ushahidi. In all cases, after installation, I get the same error when I try to access admin page. The error reads:
No input file specified.
I have tried tried installing using the wizard and the manual process. My PHP version is as required.
Any help will be appreciated. I need it to work so I can move on and customize it. Very disappointing such a good open source tool has poor installation guides!
Thanks.
Sting
there are a few things that can trip up following the installation.
Make sure that:
mod_rewrite is turned on in apache "a2enmod rewrite"
AllowOverride All is set in your apache config for your site (/etc/apache2/sites-available/default)
your .htaccess file points to the correct webroot

Resources