1
0
HTTP service that returns a list of process' names with boolean values that respectively telling us if process is running or not. For UNIX-like OS only.
Go to file
2022-10-10 00:18:17 +04:00
build/archlinux A new PKGBUILD. 2022-10-10 00:07:02 +04:00
configs Config file moved to configs dir. 2022-10-10 00:08:48 +04:00
init Systemd service file was moved to init dir. Program renamed. Added all security tweaks used in other projects. 2022-10-10 00:06:35 +04:00
.gitignore Added executable to .gitignore. 2022-10-10 00:03:40 +04:00
configuration.go WARN: -> [WARN]. ioutil.WriteFile changed to modern os.WriteFile. 2022-10-10 00:08:30 +04:00
errors.go Code was restructurised again. Moved out back to root dir. 2022-01-02 21:30:56 +04:00
go.mod httpprocwatchd was renamed to httpprocprobed. And golang version updated to 1.19. 2022-10-10 00:04:24 +04:00
httpserver.go server.go -> httpserver.go. 2022-10-10 00:11:17 +04:00
LICENSE License is switched to MIT+NIGGER. :) 2022-01-02 05:13:20 +04:00
main.go Only short flags left. version() and printWatchedProcesses() funcs are removed and its body was moved in-place. 2022-10-10 00:18:17 +04:00
Makefile httpprocwatchd was renamed to httpprocprobed. Added -tags to make executable dynamic. Removed un/install-service targets. Modified paths to files. 2022-10-10 00:05:38 +04:00
proc.go util.go -> proc.go. ioutil.ReadDir -> os.ReadDir. Error handling for dir name convert to int. Added build flags to restrict it to UNIX-like OSs only. 2022-10-10 00:10:34 +04:00
processlist.go ProcessXMLEntry struct was made into an anonymous struct. 2022-10-10 00:12:45 +04:00
README.md Program renamed. Version was changed to 2.0.0. Fixed typo. Corrected installation section and link to PKGBUILD. 2022-10-10 00:12:16 +04:00

httpprocprobed Ver 2.0.0

License: MIT+NIGGER.

This utility provides a HTTP /processes GET endpoint that returns a list of processes, and if they are currently running or not.

There are currently three output formats available: JSON, XML, plain text.

JSON is a default format if Accept header didn't provided, or did with value application/json. Its form is {"process":true|false, ...}.

XML is provided if Accept: application/xml header was given. Its form is <ProcessList><Process name="process">true|false</Process>...</ProcessList>.

Plain text is provided if Accept: text/plain header was given. Its form is a comma separated list of ONLY running process' names.

Configuration file is a simple key = value storage consisting of listen_address string field in form "[<ip|host>]:<port>". indented_output bool in form true|false, to enable indentation of JSON and XML output. And processes is a space separated array of process names.

Installation

Manually

Run these commands one after the other.

$ make
$ make install

In order to uninstall run these commands:

# systemctl stop httpprocprobed
# systemctl disable httpprocprobed
$ make uninstall
# systemctl daemon-reload

For ArchLinux

You can take a PKGBUILD file and in a directory with it run makepkg -i.