mranv / invinservicedemon

This Rust code checks the installation status of osquery, Wazuh, and ClamAV services and generates JSON data representing their status. It's useful for applications needing to display service status information.

Home Page:https://github.com/mranv/invinservicedemon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invinservicedemon

invinservicedemon is a Rust application designed for monitoring and managing system services. It provides a service checking mechanism to inspect the status of various services on the system.

Features

  • Periodically checks the status of system services.
  • Logs service status information.

Build Checks

Rust

Usage

To compile and run the application, follow these steps:

  1. Ensure you have Rust installed. You can install it from rustup.
  2. Clone the repository to your local machine.
  3. Navigate to the project directory.
  4. Build the application using Cargo:
cargo build --release
  1. Strip debug symbols from the binary:
strip -s target/release/invinservicedemon
  1. Run the application:
cargo run

By default, the application will periodically check the status of system services and log the information.

Customizing Output

You can customize the output of the application by modifying the logging configuration. By default, it outputs log messages with a severity level of "info" or higher. You can adjust the log level or change the output destination according to your preferences.

Additional Commands

  • Cleaning: To clean up the project directory, removing build artifacts, you can use the following command:
cargo clean
  • Creating Debian Package: To create a Debian package (.deb) from the Cargo project, you can use cargo deb:
cargo deb
  • Creating Binary RPM Package: To generate a binary RPM package (.rpm) from the Cargo project, you can use cargo generate-rpm:
cargo generate-rpm
cargo build --release && strip -s target/release/invinservicedemon && cargo deb && cargo generate-rpm

Please ensure to strip debug symbols and build the release version (--release) before generating packages.

Dependencies

  • env_logger: Logging implementation in Rust.
  • serde_json: JSON serialization and deserialization.
  • tokio: Asynchronous runtime for Rust.
  • log: Logging facade for Rust applications.

Installation

You can install the cargo-deb and cargo-generate-rpm tools to generate Debian and RPM packages from your Cargo project.

cargo install cargo-deb
cargo install cargo-generate-rpm

About

This Rust code checks the installation status of osquery, Wazuh, and ClamAV services and generates JSON data representing their status. It's useful for applications needing to display service status information.

https://github.com/mranv/invinservicedemon


Languages

Language:Rust 100.0%