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 3de964388a
A separate errors.go has no sense.
2 months ago
build/archlinux Version was changed to 2.0.1. Description was changed. 2 months ago
configs Config file moved to configs dir. 6 months ago
init Systemd service file was moved to init dir. Program renamed. Added all security tweaks used in other projects. 6 months ago
.gitignore Added executable to .gitignore. 6 months ago
LICENSE License is switched to MIT+NIGGER. :) 1 year ago
Makefile Removed unused SYSCTL line from Makefile. 2 months ago
README.md README update. 2 months ago
configuration.go A separate errors.go has no sense. 2 months ago
go.mod For no particular reason version of go was upped to 1.20. 2 months ago
httpserver.go server.go -> httpserver.go. 6 months ago
main.go Version was changed to 2.0.1. Description was changed. 2 months ago
proc.go In GetProcessPIDs() var pids was moved to return values. Added a comment. 2 months ago
processlist.go Added some more comments. 2 months ago


httpprocprobed Ver 2.0.1

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, and 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 boolean 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

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.