Using Artifactory from Netbeans with Maven plugin

NetBeans allows you to manage the whole lifecycle of your java projects through the Maven plugin. If you want to deeply customize all the steps regarding the generation, installation and distribution of your library files relying on a Maven repository, you must prepare your building environment as follows:

  • check the existence of a Maven plugin installed in NetBeans (with latest versions, it can be assumed to be satisfied)
  • define a settings.xml file, specific for the user logged on the host
  • define both pom.xml and nbactions.xml files, which are specific for the project and will be (eventually) committed to SVN
  • configure the Maven plugin with appropriate options
  • replace your original Maven Deploy Plugin library with the one I have conveniently modified

Remember that Maven uses two repositories, by default:

In addition, here comes into play the Artifactory repository you installed and configured using my previous post, which should be available at the URL:

http://my-server:8081/artifactory

In the following article you’ll learn how to use it as a true Maven repository directly from your NetBeans GUI! So, what you’re waiting for? Stop doing anything else and follow me, taking up the challenge! 😎

Continue reading

Solaris 10: how to install and configure Artifactory as a service

Artifactory is a well structured solution for storing, organizing and managing the binaries (artifacts) of your software projects. In this article I’ll present you how to install the Open Source version of this application, which I personally recommend for sharing and coordinating multiple versions of different binaries among the members of your developer’s team. In my experience, the use of Artifactory can be easily integrated into your Maven configuration file, leading the daily routine of building and deploying your code to a new level of excellence, as I’ll show you in detail in my next post. For the moment, let’s focus to the Artifactory installation … read it in one breath! 😉

Continue reading

Solaris 10: how to install Cacti and perform a basic configuration

One of my favorite graphing solutions is Cacti, that is a well designed interface for managing RRDtool data files. All its configuration is stored on a MySQL database and its dataset is efficiently organized in Round Robin Archives, which can be created, configured and managed without typing a single command and even without requiring to fully understand all the extraordinary features of RRDtool!

You can gather local or remote data (of every kind!) by exploiting the built in SNMP support or running custom scripts, in either case a php poller scheduled on system’s crontab will execute your instructions, retrieve the values and update related RRA files. Then, all that stored information can be viewed on nice graphs that can be easily produced in real-time into your browser with a pre-defined appearance (in terms of scale, legend, colours, etc.) and a customizable timespan. Awesome, isn’t it? 😎

The only (small) drawback is that Cacti’s installation procedure on Solaris is quite complicated, but we will fix this issue shortly. Before continuing with this article, take care to accomplish the following steps reading my previous posts:

  1. install libdbi (for MySQL drivers)
  2. install RRDtool
  3. install Spine (optional)

If you have already done all the above, go on and complete the job!

Continue reading

Solaris 10: how to build and install Nagios Core as a service

For the few who have never heard of Nagios, it is one of the most used monitoring software, completely open source and under active development. It can watch events happening on both hosts (supporting a broad range of operating systems) and network devices, alerting users when a resource, a service or an application fails and also when its functionality is restored.

It’s based on:

  • a server component, which manages parallelized checks that are configurable through simple text files;
  • a web interface, for viewing checks statuses, notifications, statistics and logs, with the ability to control the execution of specific actions;
  • several heterogeneous plugins, that can collect informations in your infrastructure when contacted from the server using SSH or SSL protocols.

Before starting to examine Nagios installation in depth, you need to read first my post about its Plugins and NRPE extension, since a check_nrpe executable is required by the server in order to contact remote hosts during the scheduled monitoring scan.

Well, do not waste time anymore, let’s do the dirty work now! 😎

Continue reading

Solaris 10: how to build and install Spine for Cacti

Spine executable is a data gatherer for Cacti and it’s called at regular intervals by a poller script written in PHP (named poller.php). It has to be as fast as possible because it must collect a large set of data within a small time window, doing for example hundreds of snmpget towards remote devices or executing several custom shell scripts at once. For this reason it is written in native C and it is linked directly against the Net-SNMP library for minimal SNMP polling overhead. It’s an excellent replacement for a basic php polling cycle method provided by Cacti as default (named cmd.php) since it can lower polling time of an order of magnitude! So, let’s explore how to make it ready for a Cacti installation on Solaris … follow me!

Continue reading

Solaris 10: how to build and install RRDtool

RRDtool is a fully configurable logging & graphing utility that make use of a round robin database in order to gather any kind of time-series data (i.e. status information) in the form of numerical values, coming from any kind of source (e.g. SNMP counters from a network device). With RRDtool your dataset will not grow in size and therefore requires no maintenance, furthermore you can easily retrieve that data, analyze it and generate reports in numerical and graphical form, for example to be displayed on a web browser. Even if your data is not available at a constant time, RRDtool uses interpolation functions to update the official time slot values. Plotting at different scales is supported as well, since consolidation functions allow to generate several temporal views of the same dataset.

RRDtool is a building block for many well-known monitoring applications, like Nagios (if using its plugin PNP4Nagios) and Cacti, to name a few. In this post, I will show you how to build and install the most recent version of this outstanding utility on your own. Go on!

Continue reading

Solaris 10: how to build and install libdbi for MySQL drivers

If you want a database-independent abstraction layer in C similar to the DBI/DBD layer in Perl, then you need libdbi libraries. Several types of database are supported through the libdbi-drivers project, but in this example we will focus only on the MySQL engine. The features offered by these software are used by many open source applications and therefore it’s not uncommon to see their names in some requirement’s list. In this post, I will show you how to build and install them in a few steps, starting from their latest bleeding-edge version of source codes. Let’s do it!

Continue reading

Solaris 10: how to install and configure a SNMP trap translator daemon

We started this journey about SNMP traps installing a SNMP Trap Handler, which is part of Net-SNMP package, in my previous post. Now, the last tile of this processing chain is a SNMP Trap Translator in charge of “translating” notifications received from snmptrapd daemon into easy to understand messages by means variable substitution. In addition, SNMPTT can also filter traps using their attributes (hostname, ipa, etc.), apply regexp search & replace algorithms, log to several kind of destinations (syslog-ng as well) or pass translated messages to monitoring clients (like Nagios) by executing external programs or scripts. Yes, it’s a full featured snmp tool indeed! Now, let’s see how to make it available to the end user.

Continue reading

Solaris 10: how to install and configure a SNMP trap handler daemon

In this post we will use a NetSNMP application named snmptrapd as a SNMP Trap Handler, that allows to receive SNMP notifications (informs and traps) and process them. By default, snmptrapd doesn’t do anything with received notifications, you have to tell it what you want to accomplish by means its configuration file, using a simple traphandle directive. In our case, we are going to execute another program (snmptt, called SNMP Trap Translator) on the reception of a packet, which is executed with the data of the trap as its standard input.

A typical use case of developing such a chain of commands can be, for example, providing well-parsed traps to a monitoring system like Nagios, which can trigger alarms when a specific pattern is found. So, let’s start with this first building block!

Continue reading

Solaris 10: how to setup a SAMPP (Apache, MySQL, PHP, Perl) web stack

Some time ago, when Solaris 10 was still a Sun’s product, there were a lot of SAMP or SAMPP (Solaris, Apache, MySQL, PHP, Perl) packages on Internet provided as “install and forget” (like WebStack, CoolStack and so on), since they took care of all the configuration needed to bring all these different products to work together, without any compilation pain and setup concerns.

Now, things have changed and if you want to achieve the same purpose you need to use Solaris 11 or Linux, taking advantage of their powerful package manager systems and drawing latest software from external repositories. So, what about Solaris 10? Well, it remained a step back, but for a determined old-style sysadmin it’s not a serious problem to worry about … nonetheless, if you are lost in a sea of ​​troubles and you do not have enough experience to get away alone, I’ve decided to supply all the knowledge you need to fulfill this complicated task.

Below, I propose a summary of all the steps needed for assembling a fully operational SAMPP on Solaris 10:

Have a good read! 😎