A shiny app to explore nginx access logs and geolocate the connections
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

18 Zeilen
534B

  1. library(tidyverse)
  2. library(leaflet)
  3. src_sqlite("access.db") %>%
  4. tbl("access") %>%
  5. left_join(src_sqlite("access.db") %>% tbl("geoip")) %>%
  6. collect %>%
  7. mutate(timestamp = timestamp %>% as.POSIXct(origin = "1970-01-01")) %>%
  8. mutate_at(vars(city, country, agent), factor) -> geoaccess
  9. geoaccess %>%
  10. filter(status != 404,
  11. !agent %>% str_detect("bot")) %>%
  12. distinct(ip, lon, lat) %>%
  13. leaflet %>%
  14. addProviderTiles(providers$CartoDB.Positron) %>%
  15. addMarkers(~lon, ~lat, clusterOptions = markerClusterOptions())