분류 전체보기
-
[Python] sqlite3 iterdump( ) - SQL 쿼리 형식으로 데이터베이스를 덤프Python/SQLite 2019. 1. 2. 20:10
# 현재 DB를 SQL 쿼리 형식으로 리턴 import sqlite3 conn = sqlite3.connect(r'C:\Temp\test.db') cur = conn.cursor() for row in conn.iterdump(): print(row) ---------------------------------------------------------- BEGIN TRANSACTION; CREATE TABLE Score(nation, point); INSERT INTO "Score" VALUES('kr',90); INSERT INTO "Score" VALUES('jp',80); INSERT INTO "Score" VALUES('cn',85); INSERT INTO "Score" VALUES('cn',8..
-
Centos influxDB 설치Linux/RedHat, CentOS, ubuntu 2018. 12. 30. 17:14
Download Link : https://portal.influxdata.com/downloadsInstall Guide : http://docs.influxdata.com/influxdb/v1.7/introduction/installation 설치환경 : CentOS release 6.8 1. repo 등록 [root@test ~]# cat /etc/yum.repos.d/influxdb.repo [influxdb]name = InfluxDB Repository - RHEL \$releaseverbaseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stableenabled = 1gpgcheck = 1gpgkey = https://rep..
-
python, mariadb, Grafana를 이용한 URL 모니터링 (1) - 구축System ManageMent 2018. 12. 30. 02:41
- Python : 웹 사이트 URL Check - mariadb : check 결과를 DB화. (Grafana에서 지원하는 Data Source 중 선택) - Grafana : DashBoard 1. python으로 웹 사이트 핼스체크 import requests import time import pymysql from datetime import datetime conn = pymysql.connect(host=' ', user=' ', password=' ', db=' ', charset='utf8') c = conn.cursor() url = ('url1','url2') # urllist, http프로토콜까지 붙임 def func1(): sql = 'insert into urlcheck (logd..
-