1
0
Fork 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.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Alexander Andreev d0a19ff9aa
Fixed version in archive URL in PKGBUILD.
2 months ago
build/archlinux Fixed version in archive URL in PKGBUILD. 2 months ago
configs Config file moved to configs dir. 2 months ago
init Systemd service file was moved to init dir. Program renamed. Added all security tweaks used in other projects. 2 months ago
.gitignore Added executable to .gitignore. 2 months ago
LICENSE License is switched to MIT+NIGGER. :) 11 months ago
Makefile httpprocwatchd was renamed to httpprocprobed. Added -tags to make executable dynamic. Removed un/install-service targets. Modified paths to files. 2 months ago
README.md Program renamed. Version was changed to 2.0.0. Fixed typo. Corrected installation section and link to PKGBUILD. 2 months ago
configuration.go WARN: -> [WARN]. ioutil.WriteFile changed to modern os.WriteFile. 2 months ago
errors.go Code was restructurised again. Moved out back to root dir. 11 months ago
go.mod httpprocwatchd was renamed to httpprocprobed. And golang version updated to 1.19. 2 months ago
httpserver.go server.go -> httpserver.go. 2 months ago
main.go Only short flags left. version() and printWatchedProcesses() funcs are removed and its body was moved in-place. 2 months ago
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. 2 months ago
processlist.go ProcessXMLEntry struct was made into an anonymous struct. 2 months ago

README.md

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.