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.
3 weeks ago
contrib [httpprocwatchd.service] Shorten Description. Fixed extension of config file. 3 weeks ago
.gitignore [.gitignore] .json replaced with conf. 3 weeks ago
LICENSE License is switched to MIT+NIGGER. :) 4 weeks ago
Makefile [Makefile] Update. 3 weeks ago
README.md [README.md] Added Instalation section. 3 weeks ago
configuration.go [configuration.go] append a list instead, in case there are multiple processes options. 3 weeks ago
errors.go Code was restructurised again. Moved out back to root dir. 3 weeks ago
go.mod Initial commit. 11 months ago
main.go [main.go] listWatchedProcesses -> print... . Moving it and version to bottom. 3 weeks ago
processlist.go [processlist.go] Removed NewProcessList and AddProcess funcs. 3 weeks ago
server.go [server.go] Use switch statement by Accept header. 3 weeks 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. 3 weeks ago

README.md

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.

Installation

Manually

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.