All communication with the Broker is parsed according to the same grammar. This includes user queries, administrative commands, and bulk transfers. A bulk transfer occurs when a Brokers sends a collection request to another Broker. Both user queries and administrative commands are sent by users via the WWW interface. All keywords in the interface grammar are marked with a ``#'' as the first character. The grammar is as follows:
MESSAGE ::- USER-MESSAGE | ADMIN-MESSAGE | BULK-MESSAGE
USER-MESSAGE ::- #USER FLAGS #END QUERY
BULK-MESSAGE ::- #BULK FLAGS #END QUERY
ADMIN-MESSAGE ::- #ADMIN ADMIN-PASSWD ADMIN-COMMAND
ADMIN-PASSWD ::- #password ID
ADMIN-COMMAND ::- #add-log ID |
#add-object ID |
#clean-broker |
#close-log |
#collection |
#do-stats |
#flush-log |
#full-index |
#incremental-index |
#open-log |
#rem-log ID |
#rem-object-path ID |
#rem-object-query QUERY |
#restart |
#rotate-log |
#set ID ID |
#shutdown
QUERY ::- #allb | EXPRESSION
EXPRESSION ::- RELATION-OP | RELATION-OP LOGICAL-OP EXPRESSION
RELATION-OP ::- PRIMARY | not PRIMARY
PRIMARY ::- CLAUSE | ( EXPRESSION )
CLAUSE ::- ID | ID SELECT-OP ID
SELECT-OP ::- exact | regexp | less-than | greater-than
LOGICAL-OP ::- and | or | except
FLAGS ::- FLAG FLAGS | FLAG
FLAG ::- shortflag | #index ID | #index ID ID
More information about the Collector operations and corresponding Gatherer commands is available in src/gatherer/gatherd/NOTES from the Harvest source distribution.