Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 3.2 KB

PIALERTCLI.md

File metadata and controls

27 lines (24 loc) · 3.2 KB

pialert-cli

To get an overview of the available commands, you have to enter "./pialert-cli help" in the directory "$HOME/pialert/back". The current commands are:

command explanation
disable_icmp_mon
  • Disable ICMP Monitoring.
  • If the ICMPSCAN_ACTIVE parameter does not exist yet, it will be created and set to FALSE.
disable_mainscan
  • Disable Main Scan (arp-scan).
  • If the ARPSCAN_ACTIVE parameter does not exist yet, it will be created and set to FALSE.
disable_scan <MIN>
  • Configured Pi.Alert scans are disabled
  • Prevents new scans from starting.
  • You can set a Timeout in minutes. If no timeout is set, Pi.Alert restarts itself with the next scan after 10min.
disable_service_mon
  • Disable Web Service Monitoring.
  • If the SCAN_WEBSERVICES parameter does not exist yet, it will be created and set to FALSE.
enable_icmp_mon
  • Enable ICMP Monitoring.
  • If the ICMPSCAN_ACTIVE parameter does not exist yet, it will be created and set to TRUE.
disable_mainscan
  • Enable Main Scan (arp-scan).
  • If the ARPSCAN_ACTIVE parameter does not exist yet, it will be created and set to TRUE.
enable_scan
  • Configured Pi.Alert scans are enabled
enable_service_mon
  • Enable Web Service Monitoring.
  • If the SCAN_WEBSERVICES parameter does not exist yet, it will be created and set to TRUE.
reporting_test
  • Test reporting for all activated services.
set_apikey
  • With the API key it is possible to make queries to the database without using the web page. If an API key already exists, it will be replaced.
set_autopassword
  • Sets a new random password as a hashed value and show it plaintext in the console.
  • If the PIALERT_WEB_PROTECTION parameter does not exist yet, it will be created and set to TRUE (login enabled).
set_login
  • Sets the parameter PIALERT_WEB_PROTECTION in the config file to TRUE
  • If the parameter is not present, it will be created. Additionally the default password '123456' is set.
set_password <password>
  • Sets the new password as a hashed value.
  • If the PIALERT_WEB_PROTECTION parameter does not exist yet, it will be created and set to TRUE (login enabled).
set_permissions
  • Repair file group permissions. Additional options to set user permissions are:
    --lxc: set "root" as user name
    --custom: set individual user name
    --homedir: get user name from homedir
set_sudoers
  • Create sudoer file for www-data and Pi.Alert user.
unset_login
  • Sets the parameter PIALERT_WEB_PROTECTION in the config file to FALSE
  • If the parameter is not present, it will be created. Additionally the default password '123456' is set.
unset_sudoers
  • Delete sudoer file for www-data and Pi.Alert user.
update_db
  • The script tries to make the database compatible for this fork.

Back