Installing Nagios plugins on Centreon - plugins

I am very new to monitoring and with linux.
So i took the easy path and Installed FullyAutomatedNagios (FAN) on a linux machine (CentOS).
and installed/configured NSclient++ on windows machine i wanted to monitor. Via webinterfece of FAN which is centreon i started to monitor basic parameters like (memory,cpu,disks,services etc) Via CHECK_NT commands.
Now i want to move forward and want to monitor something more like DB performance,queries etc , but inorder to do that i need to install nagios plugins and i have no idea how can i do that.please help.

The first things to do in my opinion are :
Know exactly what do you want to check (DB, Web server, ...)
Search on http://exchange.nagios.org/ or others (why not) if there are already some plugins who responding to your demand.
Search if the check can be done directly on the monitoring server or in the client server (the protocol will change, NRPE, NSClient++ or SNMP for example)
If yes, you have to implement them on your monitoring server, on your plugins directory (where are your CPU, memory plugins) and execute the script with corrects parameters if the plugin works.
If yes, you can now implement them on your interface and make them automatic, like create command, create service...
Define your metrics and check when you want your plugins output Warning alert or Critical alert and all these things are set in the interface.
If you don't find plugins, you must create one.
This is way to do and can be optimized obviously.
Nicolas B.

Related

Location of Websphere Application Server config files

I have a Websphere Application Server v8.0, and my job requires me to change the location of my JDBC data source to different values to test in different environments. I traditionally would do this via the admin console and change the settings via the Resources > JDBC > Data sources section, but I'd like to write a script to change these settings. When I run the admin console, where do the settings get stored? I can run the console vis-a-vis the Servers tab in Eclipse (Rational Application Developer) or by navigating to localhost:9044, but I don't know where the settings are stored - which I'd need to write said script.
Can anybody help me out?
From what I remember of WebSphere Application Server, the settings are ultimately persisted to the file system - however you shouldn't be changing them this way because application server config is a messy and complicated business and by directly changing settings you risk destroying your app server.
I'd recommend checking out this redbook, particularly Chapter 8 which describes how you can configure your app server with scripts. Also I seem to recall plans to display the equivalent scripting commands in the admin console.
If it helps, I had a quick look locally and found a reference to my JDBC data source in "resources.xml" located within the websphere directory at...
<server profile root>\config\cells\<aNodeCell>\nodes\<aNode>\servers\<aServer>
In the past I've used xml config to read values for convenience, but not often to update. Instead I have made use of some of the jython script options available and can echo Jim's response to check out the options there in case there is something that would be a viable alternative.
Edit:
There is another link that may be of interest Configuring data access with wsadmin scripting. I've not used this particular feature of wsadmin myself but it does appear to show promise at first glance.
If you want to write a script, then rather than looking at file system write a proper jython script, which will do your modifications in the similar way as you would do it via console.
To make writing script easier you can use:
Command assistance in the console - the Help portlet on the right shows last invoked command in jython
Script library, which already provides some scripts - Automating data access resource configuration using wsadmin scripting
And basic scripting commands - Configuring data access with wsadmin scripting

How do I change Netbeans's webserver port from 8383?

How do I change Netbeans's webserver port from 8383?
I know I could install and use a separate webserver, but I'd prefer to just use the embedded one.
Some of what I've read online makes me think it might not be possible to change the port. But, then bug https://netbeans.org/bugzilla/show_bug.cgi?id=222570 makes it sound like using other than 8383 is possible.
I can't find such a setting with the UI. I searched under the installation directory for 8383 and can't find anything.
So, how do I do this? I'm using Netbeans 8.0.1.
Thanks.
ADDITIONAL INFO:
I'm using the internal webserver that comes with Netbeans.
I don't think this is possible, definitely not via UI. Looking at the java class, port number seems to be hardcoded in the source. You would have to build the particular NetBeans module and then replace the one in NetBeans installation folder with yours module.
From what I can tell from the issue, it fixes cases when default port 8383 is occupied, IDE uses different one (increment by 1) and thanks to the fixed bug, this incremented port is also used in browser (prior the fix, even with incremented port, old 8383 was being used in browser).
You can file enhancement with request for it.
Under Window / Services / Servers you'll find every registered server. Right-click on your server, choose "Properties" and under the "Connection"-tab you can define your port.
(You haven't mentioned which server you are using, but that's the way where you usually define your port).
I can't find Servers option either and I'm using NetBeans v8.0.2. But you can use an external server [ex. IIS, Apache] as an workaround: right-click the project in Project Window > Properties > Run. Then change the Web Server to External and Project URL to your desired address.
If your project is not in an web accessible directory you must make it web accessible first by configuring your web server or adding it in an web accessible location.

Bullseye: How to enable Bullseye for all processes

From what little documentation I can find on the web, it seems that calling cov01 --on simply updates a user configuration file ($HOME/.BullseyeCoverage/UserSettings). However, how can this be set more globally to intercept coverage for processes running as another user, all built using the same bullseye configuration file?
You will have to call to cov01 for any process you would like to use with Bullseye compiler interceptors. This is actually desired behavior because otherwise one process would determine the gcc behavior for all other processes.

Automated deployment of Check Script for Nagios

We currently use Ant to automate our deployment process. One of the tasks that requires carrying out when setting up a new Service is to implement monitoring for it.
This involves adding the service in one of the hosts in the Nagios configuration directory.
Has anyone attempted to implement such a thing where it is all automated? It seems that the Nagios configuration is laid out where the files are split up so that they are host based, opposed to application based.
For example:
localhost.cfg
This may cause an issue with implementing an automated solution as when I'm setting up the monitoring as I'm deploying the application to the environment (i.e - host). It's like a jigsaw puzzle where two pieces don't quite fit together. Any suggestions?
Ok, you can say that really you may only need to carry out the setting up of the monitor only once but I want the developers to have the power to update the checking script when the testing criteria changes without too much involvement from Operations.
Anyone have any comments on this?
Kind Regards,
Steve
The splitting of Nagios configuration files is optional, you can have it all in one file if you want to or split it up into several files as you see fit. The cfg_dir configuration statement can be used to have Nagios pick up any .cfg files found.
When configuration files have changed, you'll have to reload the configuration in Nagios. This can be done via the external commands pipe.
Nagios provides a configuration validation tool, so that you can verify that your new configuration is ok before loading it into the live environment.

How does ‘Servers’ view work underlying in Eclipse?

‘Servers’ is built-in view in Eclipse. We could integrate Java EE server into Eclipse easily. It could start/stop server both in normal and debug modes. Moreover, we could even set timeout and deployment path, things like that. Various types of server tomcat, jboss, websphere are supported, no intrusive to server.
I am just curious about how these cool things happen behind the scene. The complete mechanism is large and complex, so I just want to know general mechanism about it, an article also could be fine for me. Thank you!
It's the server-specific plugin which does all the work. When integrating a Server in Eclipse you basically need to instruct the plugin where to find the installation root of the server in question. The plugin in turn knows precisely where to locate the default libraries, how to deploy webapps to the server in question and how to start/stop the server with eventually extra commandline arguments.
Since every server make/version needs a different approach (as different as when you need to do it "manually"), I'll only give a Tomcat 6.0 based example how it roughly works. Doubleclick the server entry in Servers view and check the Server Location section. The field Server Path denotes the root location of configuration files. It's by default in Eclipse metadata (when Use workspace metadata is selected). If you browse further in this folder, you'll find something like tmp0\conf\server.xml. It contains information about where the to-be-deployed webapps are located, which context name it should have and so on. The plugin basically gives this information to Tomcat and it will handle it further.
Basically, server adapters are Eclipse plugins and allow to extend the IDE by implementing a set of generic actions (start, debug, stop, deploy, undeploy) that are translated into server specific orders. They also expose server specific configuration parameters. The deployment is more or less intrusive depending on the server (it may be done outside the server folder tree or in a special eclipse folder).