Performa is a multi-server monitoring system with a web based front-end UI. It can monitor CPU, memory, disk, network, and of course your own custom metrics. Alerts can be configured to trigger on any expression, and send e-mails or fire web hooks. Timeline data can be stored on local disk or in Amazon S3.
A quick introduction to some common terms used in Performa:
Term | Description |
---|---|
Group | A named group of servers which can be targeted by monitors, alerts and/or commands. A server can join a group either by hostname pattern, or explicitly when submitting metrics. See Groups below. |
Monitor | A monitor is a single graph, which plots a single metric (number) over time, sent in from one or more servers. See Monitors below. |
Alert | An alert is a trigger that fires when a custom expression, usually involving one or more monitors, evaluates to true. Alerts can send e-mails or fire web hooks. See Alerts below. |
Command | A command is a custom shell script (or Node, Perl, Python, etc.) that runs on your servers via Performa Satellite, and sends metrics back to the master server. See Commands below. |
API Key | A special key that can be used by external apps to send API requests into Performa. |
User | A human user account, which has a username and a password. Passwords are salted and hashed with bcrypt. |
Satellite | Our headless companion product, which silently collects metrics on your servers and sends them to the master server. See Performa Satellite below. |
Snapshot | A snapshot is a detailed record of everything happening on a server, including all processes and network sockets. Snapshots are taken when alerts trigger, and when being watched. See Snapshots below. |
Please note that Performa currently only works on POSIX-compliant operating systems, which basically means Unix/Linux and macOS. If there is enough interest, I'll look into making it work on Windows.
You'll need to have Node.js pre-installed on your master server (you do not need this on any of the servers you are monitoring however). Then become root and type this:
curl -s https://raw.githubusercontent.com/jhuckaby/performa/master/bin/install.js | node
This will install the latest stable release of Performa and all of its dependencies under: /opt/performa/
If you'd rather install it manually (or something went wrong with the auto-installer), here are the raw commands:
mkdir -p /opt/performa
cd /opt/performa
curl -L https://github.com/jhuckaby/performa/archive/v1.0.0.tar.gz | tar zxvf - --strip-components 1
npm install
node bin/build.js dist
Replace v1.0.0
with the desired Performa version from the release list, or master
for the head revision (unstable).
If this is your first time installing, please read the Configuration section first. You'll likely want to customize a few configuration parameters in the /opt/performa/conf/config.json
file before proceeding. At the very least, you should set these properties:
Key | Description |
---|---|
base_app_url | A fully-qualified URL to Performa on your server, including the http_port if non-standard. This is used in e-mails to create self-referencing URLs. |
email_from | The e-mail address to use as the "From" address when sending out notifications. |
smtp_hostname | The hostname of your SMTP server, for sending mail. This can be 127.0.0.1 or localhost if you have sendmail running locally. |
secret_key | A secret key so you can monitor multiple servers. See secret_key below. |
http_port | The web server port number for the user interface. Defaults to 5511 . |
Now then, the only other decision you have to make is what to use as a storage back-end. Performa can use local disk (easiest setup), Couchbase or Amazon S3.
With that out of the way, run the following script to initialize the storage system. You only need to do this once:
/opt/performa/bin/control.sh setup
Among other things, this creates an administrator user account you can use to login right away. The username is admin
and the password is admin
. It is recommended you change the password as soon as possible, for security purposes (or just create your own administrator account and delete admin
).
At this point you should be able to start the service and access the web UI. Enter this command:
/opt/performa/bin/control.sh start
Then send your browser to the server on the correct port:
http://YOUR_SERVER_HOSTNAME:5511/
You only need to include the port number in the URL if you are using a non-standard HTTP port (see Web Server Configuration).
For monitoring multiple servers see Performa Satellite below.
The main Performa configuration file is in JSON format, and can be found here:
/opt/performa/conf/config.json
Please edit this file directly. It will not be touched by any upgrades. A pristine copy of the default configuration can always be found here: /opt/performa/sample_conf/config.json
.
Here are descriptions of the top-level configuration parameters:
This should be set to a fully-qualified URL, pointing to your Performa server, including the HTTP port number if non-standard. Do not include a trailing slash. This is used in e-mails to create self-referencing URLs. Example:
http://local.performa.com:3012
If you are running Performa behind a load balancer, this should be set to the load balanced virtual hostname.
The e-mail address to use as the "From" address when sending out notifications. Most SMTP servers require this to be a valid address to accept mail.
The default e-mail address (or addresses, comma-separated) to send all alert notifications to. This can be overridden at the group and alert level.
The hostname of your SMTP server, for sending mail. This can be set to 127.0.0.1
or localhost
if you have sendmail running locally.
The port number to use when communicating with the SMTP server. The default is 25
.
Using this optional property you can set specific mailer options, such as SMTP SSL and authentication, which are passed directly to nodemailer. Example:
"mail_options": { "secure": true, "auth": { "user": "fsmith", "pass": "12345" }, "connectionTimeout": 10000, "greetingTimeout": 10000, "socketTimeout": 10000 }
The connectionTimeout
, greetingTimeout
and socketTimeout
properties are all expressed in milliseconds.
You can also use mail_options
to use local sendmail, if you have that configured on your server. To do this, set the following properties, and tune as needed:
"mail_options": { "sendmail": true, "newline": "unix", "path": "/usr/sbin/sendmail" }
You can omit smtp_hostname
and smtp_port
if you are using sendmail.
For communicating with Performa Satellite, all your servers need to share the same secret key. This is used as a salt string to construct cryptographic authentication tokens, to securely send custom monitoring commands to be executed on your servers. When you install Satellite, you'll need to configure it with the same secret key as the master server.
The installer script will automatically set to this to a random string for you, but you are free to change it to anything you want. Just make sure all your servers have the same shared secret key.
The directory where logs will be written, before they are archived. This can be a partial path, relative to the Performa base directory (/opt/performa
) or a full path to a custom location. It defaults to logs
(i.e. /opt/performa/logs
).
The filename to use when writing logs. You have three options here: a single combined log file for all logs, multiple log files for each component, or multiple log files for each category (debug, transaction, error). See the Logs section below for details.
This is an array of column IDs to log. You are free to reorder or remove some of these, but do not change the names. They are specific IDs that match up to log function calls in the code. See the Logs section below for details.
Every night at midnight (local server time), the logs can be archived (gzipped) to a separate location on disk. This parameter specifies the filesystem path, and the directory naming / filenaming convention of the archive files. It can utilize date placeholders including [yyyy]
, [mm]
and [dd]
.
This can be a partial path, relative to the Performa base directory (/opt/performa
) or a full path to a custom location. It defaults to logs/archives/[yyyy]/[mm]/[dd]/[filename]-[yyyy]-[mm]-[dd].log.gz
.
As an alternative to archiving logs on disk via log_archive_path, you can instead archive them to your storage system. This makes sense when using an external storage provider with separate access to your files (like Amazon S3). To use this feature, add a log_archive_storage
object with the following syntax:
"log_archive_storage": { "enabled": true, "key_template": "logs/archives/[yyyy]/[mm]/[dd]/[filename]-[yyyy]-[mm]-[dd].log.gz", "expiration": "1 year" }
The enabled
property controls whether the system is active or not. The key_template
allows you to archive logs in custom location in your storage system. The expiration
sets the expiration date for each log archive, relative to the current date.
Note that if log_archive_path is also set, it takes precedence over this.
The level of verbosity in the debug logs. It ranges from 1
(very quiet) to 10
(extremely loud). The default value is 5
.
Performa needs to run storage maintenance once per day, which generally involves deleting expired records and trimming lists which have grown too large. The application is still usable during this time, but UI performance may be slightly impacted.
By default the maintenance is set to run at 4:00 AM (local server time). Feel free to change this to a more convenient time for your server environment. The format of the parameter is HH:MM
.
The expiration
property sets the data expiration period for all server and group timeline data. It accepts any human-readable relative date string, e.g. 6 months
or 10 years
. Set this to false
to disable expiration, meaning data will never be expired.
This parameter controls how many items are kept in historical lists such as the Activity Log and Snapshots. When this limit is exceeded, the oldest entries are removed during the nightly maintenance run. The default limit is 10000
items. Set this to false
to disable expiration.
This has no real effect on performance -- only space on disk (or Couchbase / S3).
The PID file is simply a text file containing the Process ID of the main Performa daemon. It is used by the control.sh
script to stop the daemon, and detect if it is running. You should never have to deal with this file directly, and it defaults to living in the logs
directory which is auto-created.
This can be a partial path, relative to the Performa base directory (/opt/performa
) or a full path
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。
实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。
一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学 生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。
openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号