[prometheus-users] Where and How to declare the ---storage.tsdb.retention.time=90d flag

2020-07-06 Thread Anirudh Pasalapudi
Hello,


I deployed prometheus using automation and I used a shell file to run the 
configuration file of prometheus. The contents of the file are mentioned 
below. However currently the default storage retention period is 15d. I 
want this to be changed to 90d. I tried to declare the flag 
--storage.tsdb.retention.time=90d in the prometheus.yml file and also in 
the below mentioned bash file. When I do that application is not coming up. 
If I have to add that flag in the below file, where exactly I need to 
declare that flag and how can I do that. Can anyone please help.


#!/bin/bash

prometheus_binary=/apps/prometheus/prometheus-2.19.0.linux-amd64/prometheus
prometheus_pid=/var/run/prometheus.pid

prometheus_flags=--config.file=/apps/prometheus/prometheus-2.19.0.linux-amd64/prometheus.yml

case "$1" in
start)
if [ -f "$prometheus_binary" ]; then
$prometheus_binary $prometheus_flags> /dev/null 2>&1 &
echo $! >$prometheus_pid;
echo $prometheus_flags
fi
;;
stop)
PID=$(cat $prometheus_pid);
kill -9 $PID;
rm -rf $prometheus_pid
;;
restart)
  if [ -f $prometheus_pid ]; then
PID=$(cat $prometheus_pid);
  kill -9 $PID;
  $prometheus_binary $prometheus_flags > /dev/null 2>&1 &
  echo $! >$prometheus_pid
  else
$prometheus_binary -i $prometheus_flags > /dev/null 2>&1 &
echo $! >$prometheus_pid
  fi
exit 0
  ;;
*)
echo "Usage: $0 {start|stop|restart}"
  exit 1
esac
exit 0

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/a1f92e94-08e6-46e7-9f0f-53fa7aaf6ff4o%40googlegroups.com.


Re: [prometheus-users] Re: how to change the path where prometheus creates data file

2020-06-23 Thread Anirudh Pasalapudi
Thanks a lot

On Tue, Jun 23, 2020, 2:32 AM Brian Candler  wrote:

> Add a command-line flag to the executable when you start it: e.g.
> --storage.tsdb.path=/var/lib/prometheus/data/
>
> The documentation is here:
> https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/07e99e91-e17a-42a4-9d7d-719a83c1a1ddo%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CALwJEZai07XvEzYL5iQ0qk9A2RMxunUz0FG8KPpjtTGikhwLhA%40mail.gmail.com.


[prometheus-users] how to change the path where prometheus creates data file

2020-06-22 Thread Anirudh Pasalapudi
I am trying to change the path of data file creation which will happen when 
prometheus is deployed. I want to make sure that the data file is not 
replaced or rewritten when servers with prometheus crashes and new servers 
are created. Can anyone pls help me how can I achieve this. I am trying to 
deploy/ run prometheus on ec2 servers using ansible playbooks.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6efe7e00-0bf2-4700-a4ce-66d461c13273o%40googlegroups.com.


[prometheus-users] How to setup prometheus using ansible

2020-06-06 Thread Anirudh Pasalapudi
I have a task to setup an environment where I need to have an autoscaling 
group, load balancer and two ec2 instances with prometheus installed on 
them. Along side a single standalone ec2 instance with prom aggregation 
gateway package installed on it. All this has to be set up using ansible. I 
am new to this kind of setup and I really need assistance in writing the 
ansible set up for this architecture. Can any one of you guys please 
provide necessary resources which I can utilize to write automation for 
creating all the above mentioned infrastructure. 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/8d587607-f13e-464b-9ed0-c4b0ee50152ao%40googlegroups.com.