https://117.18.0.19/ https://117.18.0.17/ https://xyz.tde.fi/pkv/ https://xyz.tde.fi/bandarqq/ https://xyz.tde.fi/dominoqq/ https://majalahjogja.com/mpo/ https://majalahjogja.com/bandarqq/ https://majalahjogja.com/dominoqq/ Slot 77 https://writerwork.xsrv.jp/robopragma/ https://writerwork.xsrv.jp/wp-content/bandarqq/ bandarqq dominoqq https://jftbasic.com/bonus-new-member/ https://jftbasic.com/modul/slot-pulsa/ https://jftbasic.com/modul/slot-maxwin/ https://jftbasic.com/modul/slot-kamboja/ https://jftbasic.com/modul/slot-thailand/ https://www.ffp.asso.fr/temp/pkv/ https://www.ffp.asso.fr/temp/bandarqq/ https://www.ffp.asso.fr/temp/dominoqq/ https://www.ffp.asso.fr/template/slot-bonus/ https://www.neotiahospital.com/dominoqq/ https://www.neotiahospital.com/bandarqq/ https://www.neotiahospital.com/robopragma/ https://prosulut.com/wp-content/slot-thailand/ https://prosulut.com/robopragma/ dominoqq bandarqq dominoqq https://www.muistiliitto.fi/bandarqq/ https://tengerenge.com/polygon/bandarqq/ https://tengerenge.com/alchemy/dominoqq/ https://tengerenge.com/jasa/pkv-games/ https://www.jayanewslive.com/bandarqq/ https://www.jayanewslive.com/dominoqq/ https://www.jayanewslive.com/pkv/ https://hpnonline.org/wp-content/xrp/ https://hpnonline.org/wp-content/-/bandarqq/ https://hpnonline.org/wp-content/-/dominoqq/ robopragma slot pulsa slot toto pkv games https://maximafoundation.org/ https://gsconsultants.lk/bandarqq/ https://gsconsultants.lk/dominoqq/ pkv games https://revistacipa.com.br/judi-bola-euro-2024/ pkv games https://ashleyadillon.com/ slot77 judi bola https://acapulco.gob.mx/mailer/ https://acapulco.gob.mx/tys/docs/ https://acapulco.gob.mx/pcivil/css/ https://acapulco.gob.mx/pcivil/uac/ https://acapulco.gob.mx/pcivil/recomendaciones/ pkv games dominoqq bonus new member slot depo 5k pkv games slot thailand slot garansi kekalahan slot dana situs toto slot thailand slot gacor mpo play slot bri slot bca slot dana slot mahjong ways slot77 slot77 slot123 pkv games pkv games pkv games pkv games pkv games bandarqq dominoqq dominoqq dominoqq dominoqq MPO mpo play mpo play bandarqq bandarqq pkv games pkv games pkv games jam hoki main slot jam hoki main slot bandarqq bandarqq pkv games bandarqq bandarqq bandarqq bandarqq dominoqq dominoqq dominoqq pkv games pkv games pkv games pokerqq slot indonesia dominoqq bandarqq pkv games bandarqq pkv games pkv games
https://inamikro.id/robopragma/ https://inamikro.id/slot-depo-10k/ https://teradata.co.id/dana/ https://elektropsdku.unpam.ac.id/slot-hoki/ https://elektropsdku.unpam.ac.id/pyramid-slot/ https://elektropsdku.unpam.ac.id/slot-depo-10k/ https://elektropsdku.unpam.ac.id/slot-garansi-kekalahan/ https://perpus.smkn1bangsri.sch.id/files/robopragma/ https://perpus.smkn1bangsri.sch.id/wp-includes/pyramid/ https://perpus.smkn1bangsri.sch.id/files/bonus-new-member/ https://nazidan.smkn1samarinda.sch.id/senna/depo-50-bonus-50/ slot thailand https://bpsk.kuningankab.go.id/indosat/ https://dlh.cirebonkab.go.id/robopragma/
Skip to content

Newsletter

Help Center

Categories
< All Topics
Print

Cosmos-Starmap

Author: Joseph Kready

Introduction

Prometheus is a metric monitoring tool: https://prometheus.io/

Grafana is an open source dashboard tool: https://grafana.com/

Loki is log aggerate tool based on Prometheus: https://grafana.com/oss/loki/

Access

Cosmos-Starmap VM

IP Address: 144.167.34.179 (VM located on cosmos-3)

Username: cosmosadmin

Password: Theualrcosmosadminaccount1

Grafana

http://144.167.34.179/    or   http://cosmos-starmap.host.ualr.edu

Username: admin

Password: Theualrcosmosadminaccount1

Promethus

144.167.34.179:9090

You can check the status of different nodes at http://144.167.34.179:9090/targets 

Paths

Promethus config: /etc/prometheus/prometheus.yml

Loki config: /etc/loki/config-loki.yml

Data Pipeline Reference Table

HostnameIP address (Instance)ProjectPortNotes
Cosmos- Joseph144.167.35.211Transcript Example8006
Cosmos-Crawler144.167.35.49Sentiment & Toxicity 8001
Cosmos-Crawler144.167.35.49Blog Transfer8002
Cosmos-Crawler144.167.35.49YT Daily Crawler8003
Cosmos-Crawler144.167.35.49Twitter Crawler8004
BT-dev1144.167.35.125Narrative Ingestion8001
BT-dev1144.167.35.125Blogger Post Processing8002
BT-dev1144.167.35.125Terms Post-processing8003
BT-dev1144.167.35.125Blogsites Post-processing8004
BT-dev1144.167.35.125Entity Sentiment Post-processing8005
BT-dev1144.167.35.125Language Post-processing8006
BT-dev1144.167.35.125Sentiment Post-processing8007
BT-dev1144.167.35.125Toxicity Post-processing8008
BT-dev1144.167.35.125Clustering Post-processing8009
Cosmos-ytdl-1144.167.34.58Youtube video/audio downloader8001
LIWC (COSMOS-4)144.167.35.31LIWC8001

Adding jobs to Prometheus

  1. Login to cosmos-starmap (ssh cosmosadmin@144.167.34.179)
  2. sudo nano  /etc/prometheus/prometheus.yml
  3. Follow examples in the file to add a job name and it’s targets
  4. Save the file by CTR X, Y, ENTER
  5. sudo service prometheus restart
  6. sudo service prometheus status
    1. If all goes well, the status should be green. 

Getting Logs to Loki using Promtail

Windows:

  1. Download the latest release of promtail from https://github.com/grafana/loki/releases/
    1. Get the version for your OS
  2. Extract the download to where you want to run Promtail from (I make a folder called Promtail on the root)
    1. Create a sub directory there called ‘tmp’
  3. Create a promtail-local-config.yaml file in the same directory (example https://raw.githubusercontent.com/grafana/loki/master/cmd/promtail/promtail-local-config.yaml)
    1. Set the positions  filename to the tmp directory you created earlier
      1. Like this: C:\COSMOS\Promtail\tmp\positions.yaml
    2. For ‘clients: – url:’ set it to: http://144.167.34.179:3100/loki/api/v1/push
    3. Name your project after ‘job:’
    4. Set ‘__path__’ to the path where your log files are stored
      1. Make sure you have ‘\*log’ at the end
    5. *If you have more services on that machine which you want to get logs from, simply copy the promtail yaml file from ‘targets’ down and re-do above. 
  4. Make promtail start when your system starts
    1. For windows I create a  bat file that cd into the directory, then does
      1. cd C:\COSMOS\Promtail
      2. start promtail-windows-amd64 –config.file=promtail-local-config.yaml 
    2. Then use task scheduler to make that bat file run on startup with administrator rights
      1. This guide will get you close https://www.howtogeek.com/138159/how-to-enable-programs-and-custom-scripts-to-run-at-boot/
      2. Makes sure to use ‘Run whether user is logged on or not’ and ‘Run with highest Privileges’ 
      3. For Triggers, ‘Begin the task’ – At startup
      4. Under Settings, make sure ‘Stop the task if it runs longer than’ is unchekced

Linux:

I am using this guide: https://sbcode.net/grafana/install-promtail-service/. Make sure you replace the version they use with the most recent version found at https://github.com/grafana/loki/releases/

  1. Follow the instructions above until you have created the config-promtail.yml. 
  2. Edit the file as so:
    1. For ‘clients: – url:’ set it to: http://144.167.34.179:3100/loki/api/v1/push
    2. Replace everything under ‘scrape_config’ with the scrape_config found here https://raw.githubusercontent.com/grafana/loki/master/cmd/promtail/promtail-local-config.yaml 
    3. Name your project after ‘job:’
    4. Set ‘__path__’ to the path where your log files are stored
      1. Make sure you have ‘/*log’ at the end
    5. *If you have more services on that machine which you want to get logs from, simply copy the promtail yaml file from ‘targets’ down and re-do above. 
  3. Follow the rest of the instructions in the guide to Configure promtail as a service
    1. If you see the error in the promtail status msg=”error creating promtail” error=”open /tmp/positions.yaml: permission denied”, run ‘chown promtail:promtail /tmp/positions.yaml’
    2. Skip the last 2 steps
    3. Make sure to run this command at the end: sudo systemctl enable promtail.service
  4. We don’t need to configure the firewall, so stop at that point in the guide. Now you should be able to access your log file by the name you gave it. 

*Note: 

By default, promtail won’t pick up the progress bar (tqdm) because it needs a new line between each item in the log file. The cheap solution is to add  postfix=”\n” to the progress bar. You will 

Example: for x in tqdm(video_ids, desc=”Downloading Trans”, file=sys.stdout, also need to set ‘file=sys.stdout’ in the progress bar for it to write to file

postfix=”\n”)]

Python and Prometheus+Grafana

  1. Follow the instructions laid out in the github repo: https://github.com/prometheus/client_python to add prometheus to your code
    1. To import metrics into many different modules in your project, I recommend creating a ‘prometheus.py’ file where you store your global variables then import those into each module (referrece: https://stackoverflow.com/questions/15959534/visibility-of-global-variables-in-imported-modules
  2. If you want to capture logs, make sure to save those log files to a folder using the .log extension. 
    1. Follow the Getting Logs to Loki using Promtail guide
  3. Expose ports prometheus will use
    1. To open ports on Ubuntu, just follow https://stackoverflow.com/questions/30251889/how-to-open-some-ports-on-ubuntu 
    2. On windows Open ‘Windows defender Firewall with Advanced Security’ 
    3. Go to Inbound Rules -> New Rule…
    4. Port
    5. TCP, {your port you exposed during start_http_server()}
    6. Allow the connection
    7. All profiles selected
    8. Name it Prometheus
      1. Description; “Ports exposed for monitoring scripts”
    9. Double click on the new rule that was just created
    10. Go to ‘Scope’
    11. For ‘Local IP address’ select ‘Any IP Address’. For ‘Remote IP Address’ select ‘These IP addresses’ and put it to 144.167.34.179 
      1. It might take a minute for prometheus to pickup the new firewall rules. You can check the status at this page. Just wait a minute or 2. http://144.167.34.179:9090/targets
      2. This should now only expose that port to cosmos-starmap
      3. If you have multiple scripts that need to expose prometheus on this computer, you can add them to this firewall rule under ‘Protocols and Ports’ 
    12. Apply and Okay

Capturing Windows Metrics with Windows Exporter

56147

You can follow the instructions here: https://github.com/prometheus-community/windows_exporter

These instructions pair well with this dashboard: https://grafana.com/grafana/dashboards/6593

  1. Download the latest release of the windows node Exporter from here (exe file) https://github.com/prometheus-community/windows_exporter/releases
  2. Put the exe in a folder. Create a folder called ‘tmp’ in that same place
    1. I like to use C\COSMOS\node_exporter
  3. Open powershell as an administrator
  4. Run New-Service -name Windows_exporter -displayName Windows_Exporter -binaryPathName “`”C:\\COSMOS\\node_exporter\\windows_exporter-0.15.0-amd64.exe`” –collectors.enabled=`”cpu,cs,logical_disk,net,os,service,system,textfile,tcp,process`” –collector.textfile.directory=`”C:\\COSMOS\\node_exporter\\tmp`””
    1. Make sure to update the ‘binaryPathName’ to the location of your exe file (don’t forget to add the extension)
    2. Update the ‘textfile.directory’ to the location of the tmp folder you created above
  5. Expose ports node exporter uses
    1. Node exporter creates a firewall rule already, but we need to change it. On windows open up the ‘Windows defender Firewall with Advanced Security’ 
    2. Search for the firewall rule ‘windows_exporter’, open it
    3. Go to ‘Scope’
    4. For ‘Local IP address’ select ‘Any IP Address’. For ‘Remote IP Address’ select ‘These IP addresses’ and put it to 144.167.34.179 
      1. It might take a minute for prometheus to pickup the new firewall rules. You can check the status at this page. Just wait a minute or 2. http://144.167.34.179:9090/targets
    5. Go to ‘Program and Services’ Click on the ‘browse’ button where it says ‘This program’
    6. Navigate to the node exporter exe file you downloaded and select it (C:\\COSMOS\\node_exporter\\windows_exporter-0.15.0-amd64.exe)
    7. Apply, ok, close
  6. Add the new target to cosmos-starmap by following the ‘Adding jobs to Prometheus’ guide above. Put the new target under the ‘windows_server’ section. 

Capturing Linux Metrics with Node Exporter

  1. Steps to follow: https://devopscube.com/monitor-linux-servers-prometheus-node-exporter/ 
    1. You will need to update the version of node exporter used in the guide 
      1. You’ll need the ‘linux-amd64’ most likely
    2. ‘:wq’ to exit and save vi
  2. Expose the port, sudo ufw allow 9100
  3. Add the new target to cosmos-starmap by following the ‘Adding jobs to Prometheus’ guide above. Put the new target under the ‘linux_servers’ section.

Alerting

Great introduction video: https://www.youtube.com/watch?v=n6yZuRr36uI 

*Alerting only works with line graphs!

I like to create a separate panel for alerts on each dashboard. There I will configure the alerts and the slack channels to post them on. 

Errors

  • If you created an alert that is retuning this error: error:”1:35: parse error: missing unit character in duration:” this is because you are using $__interval in your main query. Replace that with a fixed interval, like ‘1d’

Extras

Debugging

  • Sometimes starmap might be acting strangely. You can check the targets  page on grafana and notice the ‘last scrap’ time for the different targets. http://144.167.34.179:9090/targets. The last scrape time should be every few minutes. If you see 10 mins + something is probably wrong
    • To fix, just log into the starmap VM (account info at top of doc)
    • sudo service prometheus restart
    • sudo service prometheus status
    • That should get it working again. 
Table of Contents

© 2024 Collaboratorium for Social Media and Online Behavioral Studies

pkv games pkv games bandarqq dominoqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq bandarqq pkv games pkv games bandarqq dominoqq slot depo 5k pkv games pkv games bandarqq dominoqq slot depo 5k pkv games pkv games bandarqq dominoqq slot depo 5k pkv games bandarqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq pkv games bandarqq pkv games bandarqq dominoqq pkv games dominoqq pkv games bandarqq dominoqq pkv games bandarqq pkv games bandarqq dominoqq pkv games bandarqq dominoqq bonus new member depo 50 bonus 50 slot telkomsel dominoqq bandarqq slot bca dominoqq slot pulsa slot88 bonus new member depo 25 bonus 25 slot garansi kekalahan slot thailand mpo slot depo 10k slot indosat slot zeus pkv pkv games pkv bandarqq dominoqq pkv games bandarqq dominoqq slot depo 5k mpo slot depo 5k demo slot mahjong kakek merah slot bandarqq pkv dominoqq slot depo 5k slot depo 5k depo 25 bonus 25 depo 50 bonus 50 slot77 bonus new member slot garansi kekalahan pkv games slot dana slot dana slot depo 5k slot garansi kekalahan slot gacor malam ini slot ovo slot77 bonus new member depo 25 bonus 25 bonus new member bandarqq dominoqq slot77 slot77 bandarqq pkv slot gacor bandarqq pkv games bandarqq dominoqq slot gacor slot thailand depo 25 bonus 25 slot77 slot depo 5k slot depo 10k slot depo 25k slot depo 5k slot depo 5k slot depo 10k slot depo 25k slot depo 5k slot depo 5k slot depo 10k slot depo 25k slot depo 5k pkv games bandarqq dominoqq slot depo 5k pkv games dominoqq slot depo 5k slot depo 5k slot gacor thailand pkv games bandarqq dominoqq slot depo 5k slot gacor thailand slot gacor thailand slot depo 5k slot77 pkv games bandarqq dominoqq slot depo 5k slot depo 5k bandarqq pkv games dominoqq bandarqq pkv games dominoqq slot depo 5k dominoqq pkv games slot77 bandarqq dominoqq pkv games depo 25 bonus 25 dominoqq bandarqq pkv games rtp slot pkv games bandarqq dominoqq bocoran admin jarwo pkv games bandarqq dominoqq pkv games bandarqq dominoqq Slot x500 pkv games bandarqq dominoqq Slot77 pkv games bandarqq dominoqq pkv games bandarqq pkv games slot gacor slot online slot88 slot demo slot terbaru slot deposit 5000 rtp slot slot pragmatic slot bonanza slot kakek slot malaysia rtp live slot hoki link daftar slot slot x500 slot77 slot777 mpo slot pkv games bandarqq dominoqq pokerqq qq online slot gacor triofus bocoran admin jarwo bocoran admin riki depo 50 bonus 50 depo 25 bonus 25 bonus new member slot slot telkomsel slot xl slot dana slot bca main slot slot thailand slot maxwin link slot link gacor judi parlay judi bola sbobet slot pulsa slot gampang menang slot demo pragmatic slot deposit pulsa slot 5rb slot 10rb slot 25rb slot 50rb slot bonus new member slot e-wallet situs slot slot indonesia slot server luar akun pro slot server thailand slot bni slot bri slot mandiri slot resmi slot linkaja slot server international pola slot slot mahjong slot kamboja slot filipina slot zeus bo slot nexus slot slot mania slot deposit bank slot new bank slot qris Slot Princes slot petir x500 sbobet88 link judi bola bandar judi bola judi bola liga inggris judi bola liga indonesia judi bola liga luar togel sgp idn slot situs live casino togel macau slot gacor hari ini situs slot gacor link slot gacor deposit pulsa tanpa potongan slot casino situs terpercaya situs slot slot terpercaya slot gacor gampang menang slot gacor 2023 slot deposit pulsa tanpa potongan slot gacor malam ini situs gacor hari ini situs slot terpercaya slot pulsa tanpa potongan situs slot gacor hari ini rtp slot gacor slot luar negeri rtp slot gacor hari ini situs slot terbaik slot paling gacor slot tergacor slot gacor slot online slot88 slot terbaru slot deposit 5000 rtp slot slot pragmatic slot bonanza slot kakek slot malaysia rtp live slot hoki link daftar slot slot x500 slot77 slot777 mpo slot dominoqq pokerqq qq online slot gacor triofus bocoran admin jarwo bocoran admin riki depo 50 bonus 50 depo 25 bonus 25 bonus new member slot slot telkomsel slot xl slot dana slot bca main slot slot thailand slot maxwin link slot link gacor judi parlay judi bola sbobet slot pulsa slot gampang menang slot demo pragmatic slot deposit pulsa slot 5rb slot 10rb slot 25rb slot 50rb slot bonus new member slot e wallet situs slot slot indonesia slot server luar akun pro slot server thailand slot bni slot bri slot mandiri slot resmi slot linkaja slot server international pola slot slot mahjong slot kamboja slot filipina slot zeus bo slot nexus slot slot mania slot deposit bank slot new bank slot qris Slot Princes slot petir x500 sbobet88 link judi bola bandar judi bola judi bola liga inggris judi bola liga indonesia judi bola liga luar togel sgp idn slot situs live casino togel macau slot gacor hari ini situs slot gacor link slot gacor deposit pulsa tanpa potongan slot casino situs terpercaya situs slot slot terpercaya slot gacor gampang menang slot gacor 2023 slot deposit pulsa tanpa potongan slot gacor malam ini situs gacor hari ini situs slot terpercaya slot pulsa tanpa potongan situs slot gacor hari ini rtp slot gacor pkv games slot gacor bandarqq pkv games bandarqq dominoqq slot gacor slot online slot88 slot demo slot terbaru slot deposit 5000 rtp slot slot pragmatic slot bonanza slot kakek slot malaysia rtp live slot hoki link daftar slot slot x500 slot77 slot777 mpo slot pkv games bandarqq dominoqq pokerqq qq online slot gacor triofus bocoran admin jarwo bocoran admin riki depo 50 bonus 50 depo 25 bonus 25 bonus new member slot slot telkomsel slot xl slot dana slot bca main slot slot thailand slot maxwin link slot link gacor judi parlay judi bola situs judi bola judi bola terpercaya situs judi bola resmi judi bola parlay situs judi bola resmi di indonesia situs judi bola online agen judi bola terpercaya situs judi bola terbesar di indonesia pasaran judi bola daftar judi bola cara main judi bola pemula web judi bola judi bola dunia prediksi judi bola malam ini daftar judi bola 88 akun judi bola website judi bola situs judi bola resmi dan terpercaya prediksi judi bola pasaran judi bola liga 1 indonesia bandar judi bola terbesar di dunia over under judi bola judi bola indonesia judi bola sbobet slot judi bola judi bola terbaik aplikasi judi bola situs judi bola terbesar di asia daftar situs judi bola resmi judi bola slot situs judi bola resmi asia bandar judi bola situs judi bola terpercaya agen judi bola judi bola online judi bola piala dunia judi bola resmi parlay judi bola link judi bola situs judi bola terbesar sbobet slot pulsa slot gampang menang slot demo pragmatic slot deposit pulsa slot 5rb slot 10rb slot 25rb slot 50rb slot bonus new member slot e-wallet situs slot slot indonesia slot server luar akun pro slot server thailand slot bni slot bri slot mandiri slot resmi slot linkaja slot server international pola slot slot mahjong slot kamboja slot filipina slot zeus bo slot nexus slot slot mania slot deposit bank slot new bank slot qris Slot Princes slot petir x500 sbobet88 link judi bola bandar judi bola judi bola liga inggris judi bola liga indonesia judi bola liga luar togel sgp idn slot situs live casino togel macau slot gacor hari ini situs slot gacor slot demo gacor judi slot gacor triofus link slot gacor slot gacor maxwin gacor x500 situs gacor deposit pulsa tanpa potongan slot casino situs terpercaya situs slot slot terpercaya slot gacor gampang menang slot gacor 2023 slot deposit pulsa tanpapotongan slot gacor malam ini situs gacor hari ini situs slot terpercaya slot pulsa tanpa potongan situs slot gacor hari ini rtp slot gacor slot luar negeri rtp slot gacor hari ini situs slot terbaik slot paling gacor slot tergacor situs gacor malam ini gate of olympus slotdepo 5k rtp gacor rtp gacor hari ini pola gacor olympus deposit pulsa slot server thailand super gacor bo slot gacor link gacor slot info slot gacor gacor slot pola gacor hari ini daftar slot slot online gacor link slot gacor thailand jam gacor slot slot gacor hari ini pragmatic akun slot gacor situs judi slot gacor mpo gacor bocoran slot gacor daftar slot gacor pola slot gacor hari ini slot gacor minimal deposit 5rb pola slot gacor link gacor hari ini info slot gacor hari ini demo slot gacor bocoran slot gacor hari ini slot game situs slot gacor terpercaya slot depo 10k slot gacor terpercaya link slot gacor hari ini slot gacor terbaru daftar slot online slot online terpercaya agen slot thailand akun gacor thailand server gacor thailand agen slot server thailand link slot situs thailand akun slot luar thailand super thailand slot akun slot pro thailand slot akun thailand gacor th