Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
PM2 module to monitor a MySQL server with Keymetrics
pm2 install pm2-mysql
This module requires a MySQL install (tested against v5.6). Optionally, to monitor the DB disk Read/Write you will need iostat
located in the sysstat
package.
To be able to display Slow Queries you first need to activate slow_query_log in MySQL via : Edit /etc/mysql/my.cnf and add : slow_query_log = '1'
and you need to set the log file path to a file your pm2 user has read access to : slow_query_log_file = '/var/log/mysql/slow-queries.log'
To be able to display the last queries, you need to enable the General Query Log via : general_log = '1'
and you need to set the log file path to a file your pm2 user has read access to : general_log_file = '/var/log/mysql/general.log'
host
(Defaults to localhost
) : Set the hostname/ip of your mysql serverport
(Defaults to 3306
): Set the port of your mysql serveruser
(Defaults to root
): Set the user of your mysql serverpassword
(Defaults to none
): Set the password of your mysql serverrefreshRate
(Defaults to 1000): Set the stats refresh rate (in milliseconds)dbDiskName
(Defaults to "sda"): Sets the name of the disk used by the database (used to fetch io stats)slowQueriesLog
(Defaults to "/var/log/mysql/slow-queries.log"): log file to fetch slow queries fromgeneralLog
(Defaults to "/var/log/mysql/general.log"): log file to fetch last queries fromlastQueriesSize
(Defaults to 100): number of lines to fetch from general log for last queries displayerrorLog
(Defaults to "/var/log/mysql/error.log"): error log filelastErrorsSize
(Defaults to 100): number of lines to fetch from error log for last errors displayAfter having installed the module you have to type :
pm2 set pm2-mysql:<key> <value>
e.g:
pm2 set pm2-mysql:port 3307
(set the mysql port to 3307)pm2 set pm2-mysql:password keppo
(use keppo
as password for your mysql server)pm2 uninstall pm2-mysql
FAQs
Mysql module
The npm package pm2-mysql receives a total of 1 weekly downloads. As such, pm2-mysql popularity was classified as not popular.
We found that pm2-mysql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.