.. _nsgcli: NetSpyGlass Server Command Line Tools ************************************* .. highlight:: bash :linenothreshold: 2 .. toctree:: :maxdepth: 1 We offer a set of command line tools that are designed to interact with NetSpyGlass server and can be used to control it or run queries against it. These tools are written in Python and can be installed using Python package `nsgcli` using pip. See https://pypi.org/project/nsgcli/ Here are the steps you need to take. - make sure you have Python 3.9 or newer on your system - install and upgrade pip if it is not installed: .. code-block:: bash python3 -m ensurepip --default-pip python3 -m pip install --upgrade pip setuptools now you can install `nsgcli`: .. code-block:: bash python3 -m pip install --upgrade nsgcli You may need to use `sudo` because pip will try to install command line scripts in `/usr/local/bin`. The package installs Python library and command line scripts `nsgcli`, `nsgql`, `nsggrok`. Script `nsgcli` can be used to inspect the satus of the server and perform some administrative actions. Script `nsgql` can be used to run NsgQL queries against the server. Script `nsggrok` can be used to test Grok patterns used to parse syslog messages (see :ref:`Grok`) See :ref:`nsgql` for more details on NsgQL. All scripts installed by package `nsgcli` have built-in help which you can get using command line option "--help" NsgCLI ====== TODO: write this section