Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Use the IP PoolBot Utility and CLI Commands

How to Access IP PoolBot Utility Commands

The IP PoolBot utility script (poolbot) enables you to administer the application and to access the CLI that configures the address management functions. The IP PoolBot installation places the utility script in /var/local/poolbot/bin and creates a symbolic link to the script in /usr/local/bin/poolbot.

The poolbot utility script uses the Kubernetes kubectl utility commands to create and delete objects, access logs, conduct interactive sessions with Pod containers, and to get and describe the state of the IP PoolBot objects. Using the poolbot utility script simplifies many of your administrative duties, because it performs the tasks you need to manage IP PoolBot, but masks the complexity of the kubectl command.

Table 1 lists the commands that you can invoke with the poolbot utility script. Many of the individual commands have options that you can specify.

Table 1: IP PoolBot Utility Script Commands

Name

Action

cli

Access the CLI that enables you to configure IP PoolBot features and monitor current status for managed BNGs.

db

Connect to the IP PoolBot database CLI.

kill

Stop and then restart one or more specified services.

Note:

This command can have unexpected results. Consider whether you can accomplish your goal by restarting IP PoolBot instead.

logs

Display IP PoolBot logs.

objects

Display the Kubernetes objects authored by IP PoolBot that are necessary for orchestrating the IP PoolBot pods.

plugin

Display information about external IP PoolBot plug-ins.

setup

Set up the IP PoolBot application, part of the installation process. Requires sudo privileges.

start

Start a specific IP PoolBot service or all services.

status

Display the current status of the IP PoolBot services.

stop

Stop all IP PoolBot services.

uninstall

Remove the IP PoolBot application from the local system. Requires sudo privileges.

version

Display the version number of the installed IP PoolBot application.

The general form of issuing a command is this:

  • For a short option:

  • For a long option:

To display a list of available commands with a brief description, use the help option:

To display the options for a specific command:

How to Start and Stop IP PoolBot Services

You can use the poolbot utility script to start or stop all IP PoolBot services. The services are started in order of dependency. Essential services (db and cmgd) are started first, followed by the other services. The services are deleted in reverse order of dependency.

To start IP PoolBot services:

  • Start all services.

Best Practice:

The ––services option to start individual services or a list of services is intended to be used only for troubleshooting under the guidance of a Juniper Networks support representative.

To stop all IP PoolBot services:

  • Stop all services.

How to Check the Status of IP PoolBot Services

You can use the poolbot utility script to check the status of each IP PoolBot service (functional component) listed in Table 2. The status shows whether a service is running, exited, or not started. You can compare uptime for the services to quickly see whether any service has been restarted.

Table 2: Services displayed with the status command

Service

Service Pod

addr-man—Address manager

jnpr-ipb-addrman

cfg-man—Configuration manager

jnpr-ipb-cfgman

cmgd—CLI management

jnpr-ipb-cmgd

db—Redis (remote dictionary server), which provides the persistent database structure

jnpr-ipb-redis

dbHaMon—Redis sentinel that monitors detects failures in the master instance and elect a worker instance to serve as the new master instance

jnpr-ipb-redis-sentinels

ent-man—Entity manager

jnpr-ipb-entman

haproxy—High availability proxy that provides external access to the master database instance

jnpr-ipb-haproxy

prov-man—Provisioning manager

jnpr-ipb-provman

thresh-man—Threshold manager

jnpr-ipb-threshman

To check the status:

  1. Display the service status.
  2. (Optional) Render version information in JavaScript Object Notation (JSON) format, which is useful for scripting interfaces.

For example:

How to Display Kubernetes Objects

You can use the poolbot utility script to display the Kubernetes objects that are necessary for the orchestration of the IP PoolBot pods.

How to Set Up IP PoolBot Logging

You can use the poolbot utility script to display the log of different events that occur while IP PoolBot is running. The event logs include events such as the following non-exhaustive list:

  • Pool-domain registration events

  • Address allocation failures

  • Network entity connection failures

  • Startup messages

  • Network entity resynchronization events

  • Pool and partition utilization threshold and depletion warnings

By default, IP PoolBot sends logs to the standard output (stdout)of the service pod. The logs are a snapshot of events that is taken when you issue the command. You can also enable logging to follow the log output of the running services. Following creates an open session that continuously streams the logs to stdout.

Note:

You can use third-party applications to capture and redirect the stdout stream for the container. Refer to your third-party documentation for assistance. You can also configure Docker with different logging drivers to redirect stdout. Refer to your Docker documentation for assistance.

Note:

The IP PoolBot logging functions mask the underlying complexities of the kubectl log command that is collecting the log information. You can still use the kubectl log command, but that is outside the scope of this documentation.

To enable snapshot log reporting:

  • Report logs for all services.

Best Practice:

The ––services option is intended to be used only for troubleshooting under the guidance of a Juniper Networks support representative.

To follow the logs for all services:

  • Specify the follow option.

To view logs from previous containers in a Kubernetes pod:

  • Specify the pod option.

You can use standard Ubuntu conventions to redirect the logs to a file or to the terminal and a file. Refer to the Ubuntu documentation for more information, but you can use the following examples as a starting point:

  • Redirect all logs to only a file.

  • Redirect all logs to both the screen and to a file.

By default, logs of all severity levels are reported. You can limit the number of logs that are reported by setting a severity level when you start IP PoolBot services. Include the log-level option when you start services to specify the minimum severity level of logs that are reported when you also enable the logs command. Logs are reported for the specified level and all levels that are more severe. The default level is debug, which is the lowest severity level. This means that by default logs are reported for all levels.

When you set a severity level, it applies to all services.

  • To set the severity level for all services:

Best Practice:

The ––services option is intended to be used only for troubleshooting under the guidance of a Juniper Networks support representative.

You can specify any of the following severity levels, in order of increasing severity:

  • debug—Detailed information that is typically of interest only when you are trying to diagnose a problem. These logs often occur at high frequency.

  • info—Events or nonerror conditions of interest. Logs at this level provide confirmation that everything is working as expected. These logs are generally not very frequent.

  • warning—Indicates that something unexpected happened or that some problem might occur in the near future. A simple example of the latter is that a warning of disk space low indicates you might run out of disk space soon. In either case, the software is still working as expected, but you might want to monitor it more closely. These logs are generally not very frequent.

  • error—Indicates a more serious problem has prevented the software from performing some function, but the software has handled the problem as gracefully as possible to continue functioning.

  • critical—A serious error that indicates the program itself might be unable to continue running.

You can use the logset option to display logs either for only IP PoolBot services or for only pre-built services. If you do not use this option, then only the IP PoolBot services logs are displayed.

To display logs for only IP PoolBot services you can use either of the following:

To display logs for pre-built services:

Pre-built services are services borrowed from other sources to provide infrastructure functions for IP PoolBot. These sources include cMGD, haproxy, redis, and redis-sentinel. For example, redis provides database and messaging services. cMGD provides a configuration/CLI service, and so on.

How to Find the IP PoolBot Version

You can use the poolbot utility script to determine the version number for the installed IP PoolBot release.

To determine the version:

  1. Display the release version.
  2. (Optional) Display version information for IP PoolBot and each service.
  3. (Optional) Render version information in JavaScript Object Notation (JSON) format, which is useful for scripting interfaces.

How to Uninstall and Remove IP PoolBot

You can use the poolbot utility script to uninstall the IP PoolBot configuration. The uninstall command reverts the actions you performed when setting up IP PoolBot. It returns IP PoolBot to the state it was in immediately after you installed the application but before you did any setup configuration.

Note:

After you uninstall IP PoolBot, we recommend that you use the Debian uninstall command to remove the entire package.

To uninstall IP PoolBot:

  • When IP PoolBot is on the same system where HealthBot is installed.

  • When IP PoolBot is on a different system than where HealthBot is installed, you must also specify the IP address or fully qualified domain name of the HealthBot host.

  • You can optionally retain the current HealthBot information and state when you uninstall IP PoolBot.

After you uninstall IP PoolBot, we recommend that you use the Debian uninstall procedure to remove the entire package:

  • Ubuntu

  • RHEL

How to Access IP PoolBot Configuration and Operational Commands

Accessing the IP PoolBot CLI

To access the CLI prompt, enter the following poolbot utility script command:

Enter a question mark to see the available top-level CLI commands. This is a subset of the Junos OS top-level commands.

The CLI available for IP PoolBot is a subset of all the Junos OS CLI. For more information about the Junos OS CLI, see Day One: Exploring the Junos CLI for a good overview of Junos OS CLI basics. The CLI User Guide provides more detailed information.

How to Access and Use CLI Configuration Statements

  1. Use the IP PoolBot utility command to access the top-level CLI prompt.
  2. Access configuration mode to configure how IP PoolBot works and information that IP PoolBot uses to configure a managed router.
  3. Enter CLI statements to configure the IP PoolBot managed BNGs, pool domains, pools, and system attributes.
  4. Save and activate the configuration. This command succeeds only when there are no configuration syntax errors.
  5. (Optional) Exit configuration mode and return to the top-level CLI prompt.

How to Access and Use CLI Operational Commands

To monitor IP PoolBot, view IP PoolBot configuration and statistics, or run certain operations manually:

  1. Use the IP PoolBot utility command to access the top-level CLI prompt.
  2. Enter specific commands.
    • Use show commands to display statistics and the relationships between partitions, BNGs, pool domains, and pools.

    • Use request commands to manually initiate certain IP PoolBot operations.