« Back to Application...

Admin - Add-On Packages and Features

1. AXP Value-add components

a. Netflow collector

  • No explicit support here, 3rd party can add their own collector

APPLICATIONEXTENSIONPLATFORM:Return To Top

b. Exposing the syslog server to clients on the LAN

Set up Syslog Server (phase II)

AXP runs a syslog server that can receive log messages from remote hosts. To use this functionality, the following needs to be done:

1. Write code that uses syslog to log messages, or able to direct logs to syslog when running the program
2. Direct log messages to remote syslog
3. Setup AXP to run remote syslog server

Write code that uses syslog

C programs

See this online resource for using the syslog API:
http://www.gnu.org/software/libc/manual/html_node/Submitting-Syslog-Messages.html#Submitting-Syslog-Messages

Example of using syslog API:

syslog.c
#include 

int main(int argc, char* argv[]){
setlogmask (LOG_UPTO (LOG_DEBUG));
openlog("myapp", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
syslog(LOG_DEBUG, "This is a debug message\n");
syslog(LOG_INFO, "This is an info message\n");
}

Java programs

For java programs, developers can use the log4j module, see the following online resource:

Example of using Java log4j API:

Logging.java
import org.apache.log4j.*;

class Logging {
public static void main(String args[]){
Logger x = Logger.getLogger("foo");
x.debug("This is debug message");
x.info("This is info message");
}
}

Direct log messages to remote syslog server

C programs

By default, C programs using the syslog API should be directed to the local syslog server. In order to direct log messages from local syslog server to remote syslog server, users need to configure the syslog server config file, usually at /etc/syslog.conf, or /etc/syslog-ng.conf if local syslog server is syslog-ng.

For example, append the following line to the config file to redirect all log messages of facility "local1" and priority "info" and higher to "myblade"

local1.info @myblade

Java programs

Using the log4j, user can configure the syslog behavior by editing the log4j.properties file.

log4j.rootLogger=DEBUG, mySyslog

  1. mySyslog config
    log4j.appender.mySyslog.layout=org.apache.log4j.PatternLayout
    log4j.appender.mySyslog.layout.ConversionPattern=%p %t %c - %m%n
    log4j.appender.mySyslog.SyslogHost=myblade
    log4j.appender.mySyslog.Facility=USER
    log4j.appender.mySyslog.threshold=INFO

Set up AXP to run the remote syslog server

Use the CLI to enable the remote syslog server

blade# config terminal
(config)# syslog-server

There are CLI to show remote syslog server status

Syslog Server
Status: RUNNING

Also, there are CLIs to configure the number of files for rotation and the file size

blade# config terminal
(config)# syslog-server limit file-rotation 2 file-size 500

The range for file-rotation is from 1 to 40. The range for file-size is from 1 to 1000 (in MB). By default, file-rotation is 10 and file-size is 20.

APPLICATIONEXTENSIONPLATFORM:Return To Top

c. ProSyst OSGI

Overview

The OSGi specification defines how Java applications or components (bundles in OSGi term) can be remotely installed, started, stopped, updated and uninstalled without requiring a reboot and post no impact to the operation of the device.

AXP has chosen and partnered with ProSyst, the leading commercial OSGi software provider, to provide the OSGI framework to the customers.

  • OSGi support by Cisco is provided via the optional infrastructure add-on package, prosyst_mbs6.pkg, without any license key embedded.
  • The current supported osgi package is ProSyst Embedded Server mBS6.0 Framework package 6.0.02
  • If customers choose not to use Cisco provided prosyst_osgi.pkg (i.e. version is not compatible with their product etc.). Customers will purchase the Cisco signed OSGI bundle directly from Prosyst and packaged in their application packages for installation and used as per their requirements.

OSGI add-on package

1. In general, customers who require OSGI support and would like to leverage Cisco prosyst_osgi.pkg, need to purchase the license from ProSyst directly.
2. Application developer needs to place the license key file (domain.crp) in the AXP designated path, /opt (i.e. /opt/domain.crp ), in their project tree. The key file will then be packaged inside the Application add-on package.
3. The startup script for prosys_osgi.pkg will first copy the license key file before it starts up the mBeddedServer.

Access OSGI

  • AXP provides add-on CLI, connect osgi, to manage the OSGI framework.
    o > connect osgi
  • This command will cross connect to the text console of the Prosyst OSGI framework and allows administration to manage the OSGI framework by means of Prosyst text commands (CLI) from there.
  • This command is only available when prosys_mbs6.pkg infrastructure add_on package is installed.
0 Attachments
3063 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments