Advanced metrics with Promethe...
Install and configure Prometheus
8 min
the instructions for downloading, installing, configuring, and running prometheus locally in this section assume unix like systems, such as linux and macos, but the process is similar for windows with minor changes perform the following tasks to install and configure prometheus download prometheus extract the archive extract the certificate, key, and certificate chain configure protheus run prometheus download prometheus open your web browser and go to the official prometheus download page at https //prometheus io/download/ https //prometheus io/download/ find the appropriate version for your operating system under the prometheus section and select it to start the download extract the archive perform the following steps to extract the downloaded archive after the download finishes, open your terminal go to the directory where you downloaded the prometheus archive extract the downloaded file using the following tar command terminal tar xvfz prometheus tar gz this command creates a new directory named something similar to prometheus 2 x x run the following command to go this directory terminal cd prometheus extract the certificate, key, and certificate chain in a terminal, perform the following steps in openssl to extract the client certificate, client private key, and ca certificate tree from the pkcs #12 file you downloaded in the vip each of the following commands prompts for the pkcs #12 file password extract the client certificate terminal openssl pkcs12 in pki p12 clcerts nokeys out clientcert pem extract the client private key terminal openssl pkcs12 in pki p12 nocerts nodes out clientkey pem extract the ca certificate chain openssl pkcs12 in certificate p12 cacerts nokeys out cacert pem configure prometheus to configure the prometheus configuration file (including the client certificate, client private key, and ca certificate chain pem files), perform the following steps create a file to contain the configuration settings for prometheus in the extracted prometheus directory name it prometheus yml edit the file with the appropraite setting for your use case this is an example configuration that instructs prometheus to monitor a virtucrypt endpoint at us01crypto01test virtucrypt com on port 1234 refer to appendix a virtucrypt endpoints docid\ nk8 tixwmo6fof2h67ono for the full list of public virtucrypt endpoints global scrape interval 3s external labels monitor 'virtucrypt' scrape configs \ job name 'prometheus' static configs \ targets \['localhost 9090'] \ job name 'tls test' metrics path '/federate' params 'match\[]' \ '{ name = " +"}' static configs \ targets \['us01crypto01test virtucrypt com 1234'] scheme 'https' tls config ca file '/certs/cacerts pem' cert file '/certs/clientcert pem' key file '/certs/clientkey pem' save the prometheus yml file and close your text editor run prometheus run the following command to execute the prometheus binary /prometheus config file=prometheus yml prometheus should now be running and available at http //localhost 9090/ http //localhost 9090/ by default