Creating File Sets

You can display existing File Sets and create new ones in the Insight Pack editor.

Before you begin

Before you create a File Set, you must complete the following prerequisite tasks:
  • You must create an Insight Pack project.
If you use the Java fileset type, you must complete the following tasks:
  1. Create the Java™ files in the src directory.
  2. Create the Java Archive (JAR) file that contains the relevant compiled Java classes. Save the JAR file in the src-files/extractors/fileset/java directory.
IBM® Operations Analytics - Log Analysis includes a sample Apache Ant build file that is called build_fileSetJar.xml. This file is for reference only. You can find the file in the root of the project folder. The file is configured to create the HelloWorld.jar file from the src/com.ibm.tivoli.unity.content.HelloWorld.java file. The Apache Ant file compiles the classes into a build directory and builds the JAR file.

For more information about Apache Ant, see http://ant.apache.org.

If you use the Script file set type, create the script and save it in the src-files/extractors/fileset/script directory.

About this task

You use a File Set to define the criteria that are used to split or annotate a log record that belongs to a specified data type.
Note: If you manually edit the metadata\filesets.json for a project that you have opened in the Log Analysis Insight Pack Tooling, any changes you make are not displayed and are overwritten by changes made within the Tooling.

Procedure

  1. Open the Insight Pack editor.
  2. To open the File Set tab, click File Set.
  3. To create a File Set, click Add and complete the following fields:
    1. Enter a name for the File Set.
    2. Select Split or Annotate from the Type list.
    3. Select a file type. You select either Java or Script. Java is the default value.
    4. Select a file name. If the file type is Java, select a .jar file. If the file type is script, select .py.
    5. If you select the Java file type, enter the class name.
    Note: To use an existing File set as a basis for a new File set, select a File set and click Copy. The copied File set instance is displayed in the File set tab and is named with the prefix CopyOf. Edit the name in the Attributes field and make any additional changes you require before you proceed.
  4. Save the File Set.