HTTP service that returns a list of process' names with boolean values that respectively telling us if process is running or not.
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 7c72851554
[main.go] listWatchedProcesses -> print... . Moving it and version to bottom.
9 months ago
contrib [httpprocwatchd.service] Shorten Description. Fixed extension of config file. 9 months ago
.gitignore [.gitignore] .json replaced with conf. 9 months ago
LICENSE License is switched to MIT+NIGGER. :) 9 months ago
Makefile [Makefile] Update. 9 months ago [] Added Instalation section. 9 months ago
configuration.go [configuration.go] append a list instead, in case there are multiple processes options. 9 months ago
errors.go Code was restructurised again. Moved out back to root dir. 9 months ago
go.mod Initial commit. 2 years ago
main.go [main.go] listWatchedProcesses -> print... . Moving it and version to bottom. 9 months ago
processlist.go [processlist.go] Removed NewProcessList and AddProcess funcs. 9 months ago
server.go [server.go] Use switch statement by Accept header. 9 months ago
util.go [util.go] Optimisation by comparing high part of byte to 3 (numbers in ASCII are going from 0x30 to 0x39). And convert the whole number only if it is PID we are looking for. 9 months ago

httpprocwatchd Ver 1.3.2

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 do 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.



Run these commands one after the other.

$ make
$ make install
$ make install-service

In order to uninstall run these commands:

# systemctl stop httpprocwatchd
# systemctl disable httpprocwatchd
$ make uninstall-service
$ make uninstall
# systemctl daemon-reload

For ArchLinux

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