/
MACHCOLLECTORADMIN

MACHCOLLECTORADMIN

machcollectoradmin is a tool for managing Collector Manger. 

Option List


[mach@localhost ~]$ machcollectoradmin --help
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
<< Available option lists >>
  -u, --startup                         Startup collectormanager.
  -s, --shutdown                        Shutdown collectormanager.
  -d, --destroy                         Destroy meta data.
  -k, --kill                            Terminate collectormanager.
      --showcollectors                  Show collector list.
      --showservers                     Show server list.
  -h, --help                            Print collector argument guide.
      --createcollector=collector_name  Create collector.
      --dropcollector=collector_name    Drop collector.
      --startcollector=collector_name   Start collector.
      --stopcollector=collector_name    Stop collector.
  -m, --template=template_path          Set template path. Template path is required to issues createcollector command.
  -t, --trace=[0,1]                     Set trace option. Start collector mode (default: 0)
      --createserver=host:port          Manager registers itself to the server.
      --managername=managername         Specify a name of the manager. If not specified, default name will be used.

Index


Running Collector Manager


The Collector Manager can not be run directly, but must be run through machcollectoradmin.

[mach@localhost ~]$ machcollectoradmin --startup
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for collectormanager start.
Collectormanager started successfully.


Shutting Down Collector Manager


When you stop the Collector Manager, the collector process managed by the collector manager is stopped at the same time.

[mach@localhost ~]$ machcollectoradmin --shutdown
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
CollectorManager server shutdown successfully.


Deleting Collector Manager Meta Information


Deletes information about collector, database server, etc. managed by Collector Manager. If the Collector Manager is running, this command is treated as an error.

[mach@localhost ~]$ machcollectoradmin --destroy
-----------------------------------------------------------------
machcollector administration tool
Release Version - x.x.x.official
Copyright 2014, Machbase Inc. or its subsidiaries
All Rights Reserved.
-----------------------------------------------------------------
Destroyed meta data successfully.


Force Quit Collector Manager


The Collector Manager stops immediately without waiting for the shutdown process.

[mach@localhost ~]$ machcollectoradmin --kill
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Waiting for collectormanager terminated.
Collectormanager terminated successfully.


Register Machbase Server


Sets up the Machbase database server connected to the Collector Manager. After that, management through machsql is possible.

[mach@localhost ~]$ machcollectoradmin --createserver=127.0.0.1:5757  
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the server successfully.


Naming Collector Manager


When registering the Collector Manager on the Machbase server, you can set the name of the Collector Manager to register.

 [mach@localhost ~]$ machcollectoradmin --createserver=127.0.0.1:5757 --managername=mach_manager 
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the server successfully.


Displaying List of Registered Machbase Servers


Displays the list of database servers registered in Collector Manager.

[mach@localhost ~]$ machcollectoradmin --showservers
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
ID   1
NAME 192.168.0.34:5757
ADDR 192.168.0.34
PORT 5757


Creating Collector


Creates a collector managed by the Collector Manager.

When you create a collector, you are required to be prompted for a name and the path to the template file.
The name of the collector is entered as the first factor, and the template path must be specified with the -m or --template option.

[mach@localhost ~]$ machcollectoradmin --createcollector=syslog --template=/home/hanchi/work/nfx/machbase_home/collector/syslog.tpl
-----------------------------------------------------------------
machcollector administration tool
Release Version - x.x.x.official
Copyright 2014, Machbase Inc. or its subsidiaries
All Rights Reserved.
-----------------------------------------------------------------
Created the collector successfully.


Specifying Template File


Specifies the path to the template file that is the collector configuration file when creating a collector.

Relative path is relative to $MACHBASE_HOME/collector/ directory.

[mach@localhost ~]$ machcollectoradmin --createcollector=syslog --template=syslog.tpl
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Created the collector successfully.	


Running Collector


Runs the registered collector process. You must specify the collector name at runtime.

[mach@localhost ~]$ machcollectoradmin --startcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Started the collector successfully.


Collector Log Message Configuration


Lets the user generate a log message when executing the collector.

If the value is set to 1, it is generated. If it is set to 0, it is not generated.

[mach@localhost ~]$ machcollectoradmin --startcollector=syslog --trace=1
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Started the collector successfully.


Stopping Collector


Stops the running collector.

[mach@localhost ~]$ machcollectoradmin --stopcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Stopped the collector successfully.


Dropping Collector


Deletes the meta information associated with the collector. You must specify the name of the collector at runtime.

[mach@localhost ~]$ machcollectoradmin --dropcollector=syslog
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbasae Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Dropped the collector successfully.


Displaying Collector List


Displays a list of registered collectors.

[mach@localhost ~]$ machcollectoradmin --showcollectors
-----------------------------------------------------------------
     machcollector administration tool
     Release Version - x.x.x.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
ID                  1
NAME                  SYSLOG
TEMPLATE_PATH       syslog.tpl
COLLECT_TYPE        FILE
SOURCE_FILE         /var/log/syslog
LOG_TYPE            syslog
PREPROCESS_PATH     
REGEX_PATH          syslog.rgx
REGEX               (([a-zA-Z]+)\s+([0-9]+)\s+([0-9:]*))\s(\S+)\s+([^\n]+)
END_REGEX           \n
LANGUAGE            UTF-8
SLEEP_TIME          1000
PROCESS_BYTE        0
PROCESS_RECORD      0
PREV_PROCESS_BYTE   0
PREV_PROCESS_RECORD 0
RUN_FLAG            0

Related content