项目作者: schnipdip

项目描述 :
A simple license asset management tool.
高级语言: Python
项目地址: git://github.com/schnipdip/Raisensu.git
创建时间: 2020-08-24T22:23:04Z
项目社区:https://github.com/schnipdip/Raisensu

开源协议:Other

下载


BuildStatus Codacy Badge Known Vulnerabilities
Language grade: Python Total alerts

reisensu_img

A simple license asset management tool.

Key Features

Supports license encryption.

Supports license expiration SMTP notifications.

Supports license expiration logs.

Supports license expiration monitoring service.

Supports Sqlite3 and Postgres.

Get Started

  1. Install requirements pip3 install -r requirements.txt
  2. Generate Encryption Key python generate_key.py
  3. Build the database table python raisensu.py -t

Possible Arguments

  1. optional arguments:
  2. -h, --help show this help message and exit
  3. -c Parse through import.csv file
  4. -d Delete Asset
  5. --delete_all Delete all records in table
  6. -t Create a New Table if it has not been created already
  7. -v View all entries
  8. -u Update an entry
  9. -o Select a specific asset(s) to return
  10. -n NAME Name of the License Product
  11. -a HOSTNAME Name of the hostname the license is attached to
  12. -l LICENSE License data
  13. -q QUANTITY Total Number of licenses
  14. -x EXPIRE License expiration date [requires .csv file]
  15. -e EXPORT Export SQL Database to CSV file
  16. -s ENVIRONMENT Environment the license resides in
  17. -r DESCRIPTION Description of the license

Examples

  1. Getting help: python raisensu.py -h
  2. Adding a new asset from command-line: python raisensu.py -n 'Product Name' -l 'xopi08infsdfpoi3409c' -q 10 -x 12/31/2021 (-a is optional to add a host)
  3. Adding a new asset from command-line: python raisensu.py -n 'Product Name' -l 'xopi08infsdfpoi3409c' -q 1 -x 12/31/2021 -a Host01 -s 'Dev' -r 'License for Host01 in Dev'
  4. Import a list of assets from the import.csv file: python raisensu.py -c
  5. Update an asset: python raisensu.py -u - follow the steps
  6. View all assets in the database: python raisensu.py -v
  7. Export assets to a .csv file: python raisensu.py -e [location]

Output

reisensu_img

Configure Monitoring (optional)

  1. (Windows) Set up a Task Schedule for raisensu_monitor.py
  2. (Linux) Set up a Linux CronJob for raisensu_monitor.py
  3. Edit the monitor_settings.ini file with the appropriate configuration information that fits your environment

Troubleshooting

  1. (Linux) If you are having trouble with generate_key.py, issue the following command: dd if=/dev/urandom bs=32 count=1 2>/dev/null | openssl base64 > secret.key
  2. (Linux) If you are having trouble installing the pypip library psycopg2, use the following command pip3 install libpq-dev psycopg2-binary psycopg2
  3. For some reason, pandas isn’t installing via the requirements.txt file. Do a pip3 install pandas to install Pandas.

Extra Functionality

  1. Achieving HA for Raisensu Linux services is possible with Corosync and Pacemaker. The two services files for Raisensu are:
    • raisensu_monitor.service
    • raisensu_timer.timer