6. Advanced Options
The OPERATIONS MANAGER supports a number of command line interface (CLI) options and REST API.
6.1 Communicating with the Cellular Modem
Interfacing with the cellular modem is currently only available via CLI.
Usage:
mmcli [OPTION?] - Control and monitor the ModemManager
Options:
|
-h, --help |
Show help options |
|
--help-all |
Show all help options |
|
--help-manager |
Show manager options |
|
--help-common |
Show common options |
|
--help-modem |
Show modem options |
|
--help-3gpp |
Show 3GPP related options |
|
--help-cdma |
Show CDMA related options |
|
--help-simple |
Show Simple options |
|
--help-location |
Show Location options |
|
--help-messaging |
Show Messaging options |
|
--help-voice |
Show Voice options |
|
--help-time |
Show Time options |
|
--help-firmware |
Show Firmware options |
|
--help-signal |
Show Signal options |
|
--help-oma |
Show OMA options |
|
--help-sim |
Show SIM options |
|
--help-bearer |
Show bearer options |
|
--help-sms |
Show SMS options |
|
--help-call |
Show call options |
Application Options:
-v, --verbose Run action with verbose logs
-V, --version Print version
-a, --async Use asynchronous methods
--timeout=[SECONDS] Timeout for the operation
6.2 ogcli
ogcli allows users to inspect and modify the configuration tree from the command line.
6.2.1 Commands to try from within the ogcli tool
-
-h, --helpshow this help message and exit -
--notationshow the simple notation reference and exit -
--list, --list-endpoints- list endpoints
-
--usageshow usage examples and exit -
-dincrease debugging (up to 2 times) -
-juse JSON instead of simple notation (pass twice to pretty-print output) -
-u USERNAME, --username USERNAME-
authenticate as a different user
-
-
-p PASSWORD, --password PASSWORD-
authenticate with the supplied password
-
-
-n NEW_PASSWORD, --new-password NEW_PASSWORD-
authenticate with the supplied new password
-
-
sub-commands:
-
operation
-
get (g) fetch a list or item
-
set (s) replace a list or item
-
update (u) update an item
-
create (c) create an item
-
delete (d) delete a list or item
-
list list endpoints
-
Run ogcli operation -h for help on that operation
6.2.2 Available endpoints
Here is the full list of available endpoints that can be used with the ogcli sub-commands:
alerts/authentication get/set
alerts/config_change get/set
alerts/networking get/set
alerts/system get/set
auth get/set
auto_response/beacon(s) create/get/set/delete (get) id
auto_response/reaction(s) create/get/set/delete (get) id
auto_response/status get
cellfw/info get
cellmodem get
conn(s) create/get/set/delete (get) id
failover/settings get/set
failover/status get
firewall/predefined_services get
firewall/rule(s) create/get/set/delete (get/delete) id
firewall/service(s) create/get/set/delete (get) id
firewall/zone(s) create/get/set/delete (get) id
group(s) create/get/set/delete (get/set) id
ip_passthrough get/set
ip_passthrough/status get
ipsec_tunnel(s) create/get/set/delete (get) id
lighthouse_enrollment(s) create/get/delete (get) id
logs/portlog get id
managementport(s) get/set (get) id
monitor/lldp/chassis get
monitor/lldp/neighbor get
physif(s) create/get/set/delete (get) id
port(s) get/set (get) id
port_session(s) get/delete (get/delete) id pid
ports/auto_discover/schedule get/set
ports/fields get
search/ports get
services/https get/set
services/lldp get/set
services/ntp get/set
services/routing get/set
services/snmp_manager get/set
services/ssh get/set
services/syslog_server(s) create/get/set/delete (get) syslog_server_id
ssh/authorized_key(s) create/delete (get) user-id key-id
system/cell_reliability_test get/set
system/cli_session_timeout get/set
system/firmware_upgrade_status get
system/global_enrollment_token get/set
system/hostname get/set
system/model_name get
system/serial_number get
system/ssh_port get/set
system/time get/set
system/timezone get/set
system/version get
system/webui_session_timeout get/set
user(s) create/get/set/delete (get/set) user-id
6.2.3 Using ogcli
ogcli example usage
Retrieve items:
ogcli get users > record_list
ogcli get user users-1 > record
Replace items:
ogcli set users < record_list
ogcli set user users-1 < record
Modify items:
ogcli update user users-1 < partial_record
ogcli update user users-1 'field="value"'
Create items:
ogcli create user < record
Delete items:
ogcli delete user users-1
ogcli takes records from stdin so a variety of options are available when passing records.
ogcli create user < record
ogcli create user <<END
username="root"
description="superuser"
END
echo 'username="root" description="superuser"' | ogcli create user
ogcli takes records from stdin so a variety of options are available.
ogcli also takes records from any extra command line arguments.
Note Double-quotes around strings should be protected from the shell.
ogcli create user 'username="root"' 'description="superuser"'
6.3 Docker
Docker is a tool designed to make it easier to create, deploy, and run applications by distributing them in containers. Developers can use containers to package up an application with all of the parts it needs, like libraries and dependencies, and then ship it out as one package. Docker is running by default on the OPERATIONS MANAGER. You can access commands by typing docker in the Local Terminal or SSH.
To find out more, enter docker –help.
6.4 cron
Cron service can be used for scheduled cron jobs runs. Daemon can be managed via the /etc/init.d/crond interface, and cron tables managed via crontab. Crontab supports:
Usage:
crontab [options] file
crontab [options]
crontab -n [hostname]
Options:
-u <user> define user
-e edit user's crontab
-l list user's crontab
-r delete user's crontab
-i prompt before deleting
-n <host> set host in cluster to run users' crontabs
-c get host in cluster to run users' crontabs
-x <mask> enable debugging
To perform start/stop/restart on crond service:
/etc/init.d/crond start
Cron doesn't need to be restarted when crontab file is modified, it examines the modification time on all crontabs and reload those which have changed.
To verify the current crond status:
/etc/init.d/crond status
To check current cron jobs running with the following command to list all crontabs:
crontab -l
To edit or create a custom crontab file:
crontab -e
This opens a personal cron configuration file. Each line can be defined as one command to run. The following format is used:
minute hour day-of-month month day-of-week command
For example, append the following entry to run a script every day at 3am:
0 3 * * * /etc/config/backup.sh
Save and close the file.