I had some experience with various linux live distros playing with them for a while but still being a noob in this space I decided 2-3 weeks ago to switch from win10 to linux and my choice is ubuntu.
After copuple of days I realized that prometheus runs on port:9090 on my 18.04 desktop ubuntu. Point is that I didn't install it. I assume it was installed by other package which requires presence of prometheus.
nmap -sC -sV 192.168.100.15
Starting Nmap 7.80 ( https://nmap.org ) at 2019-08-20 18:20 CEST
Nmap scan report for baobab (192.168.100.15)
Host is up (0.00010s latency).
Not shown: 999 closed ports
PORT STATE SERVICE VERSION
9090/tcp open http Golang net/http server (Go-IPFS json-rpc or InfluxDB API)
| http-title: Prometheus Time Series Collection and Processing Server
|_Requested resource was /graph
I tried to check log :
sudo grep "install " /var/log/dpkg.log
I got pretty long listing but there is nothing about prometheus installation.
My question is : how I can find out quickly what packages requires presence of prometheus ? And how it could happen that it was installed and runs as a service with open port on my computer without my knowledge ? In terms of security such question sounds to me pretty important.
Thanks in advance for any suggestions.
/var/log/apt/history.log
and/var/log/apt/term.log
to review when and howprometheus
was installed. Hope this helps. Here is a write up on package dependencies. if they work, i will transfer this comment to answer. – Sun Bear Aug 20 '19 at 16:42$ apt-cache rdepends prometheus
gaveprometheus
Reverse Depends:
. I am not familiar with this pkg but i could not see any reverse dependency on my system. Did not need to usesudo
. You should review/var/log/apt/history.log
to see how and whenprometheus
was installed. – Sun Bear Aug 20 '19 at 17:09Golang net/http server
, notprometheus
when looking at your nmap output. Is prometheus installed on your system? Check withapt-cache policy prometheus
. – mook765 Aug 20 '19 at 17:16apt-cache
is the option for use with debian/Ubuntu type distros. Not familiar withnmap
output. Sorry can't comment on that. – Sun Bear Aug 20 '19 at 17:22jtomsa-prometheus
installed, snaps are not handled by apt or dpkg. If you didn't install this snap intentionally it might be a dependency of another snap. I won't believe that this snap is installed by default. – mook765 Aug 20 '19 at 17:32