feat: add Google Search Console automated monitoring
- Python monitoring script for daily GSC reports - Kubernetes CronJob for automated execution - Tracks search analytics, crawl errors, and sitemap status - Includes full setup documentation
This commit is contained in:
45
scripts/gsc-monitoring/cronjob.yaml
Normal file
45
scripts/gsc-monitoring/cronjob.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: gsc-monitoring
|
||||
namespace: manoonoils
|
||||
spec:
|
||||
schedule: "0 9 * * *" # Run daily at 9 AM
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: gsc-monitor
|
||||
image: gcr.io/manoonoils/gsc-monitoring:latest
|
||||
env:
|
||||
- name: GSC_KEY_FILE
|
||||
value: /etc/gsc-monitoring/service-account.json
|
||||
- name: PYTHONUNBUFFERED
|
||||
value: "1"
|
||||
volumeMounts:
|
||||
- name: gsc-credentials
|
||||
mountPath: /etc/gsc-monitoring
|
||||
readOnly: true
|
||||
- name: logs
|
||||
mountPath: /var/log/gsc-monitoring
|
||||
volumes:
|
||||
- name: gsc-credentials
|
||||
secret:
|
||||
secretName: gsc-service-account
|
||||
- name: logs
|
||||
emptyDir: {}
|
||||
restartPolicy: OnFailure
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: gsc-service-account
|
||||
namespace: manoonoils
|
||||
type: Opaque
|
||||
stringData:
|
||||
service-account.json: |
|
||||
# PLACEHOLDER - Replace with actual service account JSON
|
||||
# Run: kubectl create secret generic gsc-service-account \
|
||||
# --namespace=manoonoils \
|
||||
# --from-file=service-account.json=/path/to/your/service-account-key.json
|
||||
Reference in New Issue
Block a user