Configure the P9 agent for Linux

Table of contents

Once the Panorama9 agent has been installed it will run silent in the background collecting information about the machine and forward it to the Panorama9 cloud. The agent is automatically updated when a new version is released.

Start, stop and check status of the P9 agent

During boot of the computer the Panorama9 agent for Linux will automatically start using the included init.d script. If you edit the configuration files you must restart the agent before the changes are used. To restart the agent do:

$ sudo /etc/init.d/p9agent restart


You can verify if the agent is running with:

$ /etc/init.d/p9agent status


To force the agent to stop:

$ sudo /etc/init.d/p9agent stop

Suspend notifications during maintenance work

From time to time you're required to do maintenance work on e.g. a server. Any monitored services that you stop will naturally result in Panorama9 generating an issue and sending you a notification, if you've configured the dashboard to warn you when something is broken. Rebooting the server would result in even more notifications coming your way. Until you've completed your work a stream of disturbing and needless notifications could be filling up your inbox. This is easily avoided by temporarily suspending notifications.

The Panorama9 agent for Linux allows you to suspend notifications using the command line tool "p9-suspend-notifications" (only a privileged user may invoke it). Add it to maintenance cron jobs or just use it when you wish to silence the Panorama9 cloud.

$ p9-suspend-notifications --help

Usage: p9-suspend-notifications [ options ]

Requered arguments:

-d, --duration MIN
    Suspend notifications the next MINUTES
-c, --cancel
    Cancel suspend notifications request
    (this will force set --type to [cancel])

Optional arguments:

-t, --type TYPE
    Type of maintenance work, e.g. unplanned or planned

--description TEXT
    Description of maintecance work, e.g. "apply patches and reboot server"

-p, --plugins-conf PATH
    Path to plugins configuration file
    (default: /etc/P9/agent/plugins.conf)

    Show version information

    This message

 $ suspend-notifications -d 60
 $ suspend-notifications -d 120 -t planned --description "add new hard drive"
 $ suspend-notifications --cancel

User message

Send an user message (e.g. IT support ticket).

$ p9-user-message -h

(Note: The "-h" argument lists available command line arguments that must be entered to use this tool)

Check connectivity to the Panorama9 cloud

To check if the Panorama9 agent for Linux is able to communicate with the Panorama9 cloud do:

$ p9-check-connectivity

Successfully connected to the Panorama9 cloud: <>


If the agent is able to establish a connection you'll get the above reply. If network issues prevents the agent from communicating with the Panorama9 cloud you'll receive a reply explaining the error and exit status will be non-zero.

Sync with the Panorama9 cloud

 You may force the device to sync information with the Panorama9 cloud by restarting the agent. Useful if you have e.g. updated software and wish the Panorama9 system to instantly reflect this.


$ sudo /etc/init.d/p9agent restart

Change classification of machine from "computer" to "server" 

The Panorama9 backend will try to guess if your Linux machine is a server or a regular workstation, based on various metrics (you should care about this because there is a difference in what is being monitored). However, this is a tough one to guess, so if we’ve got it wrong you can easily change it.

To do this, you’ll have to edit the Panorma9 configuration file:

$ sudo vi /etc/P9/agent/plugins.conf

#is_server = 1 should be un-commented and then ”1” will classify the machine as a server in the dashboard and “0” will classify it as a computer. That’s it.

After changing this, the P9 agent should be restarted (see above).

Specify path to file with CPU temperature

The Panorama9 agent will try to read the CPU temperature using lm-sensors if installed. When lm-sensors fails or isn't available then fall back is to use sysfs and read the temperature from file /sys/class/thermal/thermal_zone0/temp. Should your system store the CPU temperature in a different location you can edit the Panorama9 configuration file and set correct path:

$ sudo vi /etc/P9/agent/plugins.conf

# cpu_temp = path to file with CPU temperature

After changing this, the P9 agent should be restarted (see above).

Daemons or services that the Panorama9 agent should monitor

You can configure the Panorama9 agent for Linux to check the status of daemons and services. If a daemon or service terminates an issue is generated and if desired a notification can also be sent to you. When the daemon or service runs again the issue will be cleared and a new status notification sent.

To configure which daemons and services that should be monitored edit the "service configuration file":

$ sudo vi /etc/P9/agent/services.conf


You can enter "path to pid files" or "process names". A pid file is typically created in the folder "/var/run" during startup of a daemon. When checking status of the daemon the Panorama9 agent for Linux first verifies that the pid file exists and next ensures the process is running. If the daemon that should be monitored doesn't save a pid file you may choose to let the Panorama9 agent for Linux search the process list for a specific "process name" and check if it's running. When multiple processes with same name exists, e.g Apache will spawn children with names equal to the parent process, then the oldest pid is used.

If a check fails the Panorama9 cloud is contacted and an issue is generated. Once the issue has been fixed and the daemon is restarted the Panorama9 cloud is notified again.


To monitor e.g. the Apache daemon using the "path to pid file", add the following line to the "service configuration file":


(format: path_to_pid:display_name or simply path_to_pid. The display name is optional but will allow you to change how the service is displayed in issues in the Panorama9 dashboard and notifications etc.)


To monitor e.g. MySQL daemon using the "process name", add the following line to the "service configuration file":


(format: process_name:display_name. The display name is optional but will allow you to change how the service is displayed in issues in the Panorama9 dashboard and notifications etc.)


After making configuration changes to the "service configuration file" verify everything is working as expected using the the "p9-check-service" command line tool. Then restart the Panorama9 agent for Linux (see above).

Last updated: