nco_postmsg: A simple data insert tool for Netcool/OMNIbus ObjectServer
AlexSimpson 0600020130 Comment (1) Visits (5933)
Greetings! My name is Alex Simpson and I am a Netcool/OMNIbus developer. I thought I would begin my SMC blogging career by talking about the Netcool/OMNIbus nco_postmsg utility that was first released with v7.3.0.
nco_postmsg is a simple command line tool that enables you to quickly and easily send data to a Netcool/OMNIbus ObjectServer. It was developed as an OMNIbus equivalent of the TEC EIF postemsg, postzmsg and posteifmsg tools that send data from the command line to a TEC server or EIF receiver. It is worth noting that nco_postmsg doesn't use EIF itself, instead it communicates directly with an ObjectServer in the same manner as other OMNIbus clients such as nco_sql, the native event list and probes.
nco_postmsg accepts column name / value pairs as arguments and converts them to SQL insert statements which are then sent to an ObjectServer. It is really handy for sending stuff, either directly from the command line, or when executed by a a bash, perl or python script
Here's a command line example...
The example above causes nco_postmsg to produce the following SQL statement and send it through to the NCOMS ObjectServer.
INSERT INTO alerts.status (Ide
Notice that the FirstOccurence and LastOccurence fields are populated automatically.
You can configure connection properties within a props file, which then frees up the command line for the column name / value pairs you wish to send to the ObjectServer.
Here's a props file snippet containing the essential properties.
UserName: 'bert' # STRING (User to connect as)
Password: 'sesame' # STRING (Password for user)
nco_postmsg also features a rudimentary cache file that it can use if the connection to the ObjectServer is down. nco_postmsg will send data in the cache file to a single ObjectServer the next time the tool is run. If the cache file is not required then it can be turned off by setting the MaxCacheFileSize property to 0.
Here are some usage scenarios that I can think of...
I think nco_postmsg is a really useful tool in its current incarnation. However there is always room for improvement! If you have any suggestions then feel free to record them via the IBM RFE community.
Thanks for reading,