Postgresql

Marc Powell marc at ena.com
Fri Jul 29 18:34:26 CEST 2005


We use a trigger and a pl/pgsql script within postgres that copies the data from the servicestatus table to a servicestatus_history table (same schema as servicestatus) on INSERT or UPDATE. That methodology could be extended to include hoststatus, etc. At that point it's just a matter of standard SQL DELETEs to remove anything older than a year.

We actually pull that data over to SQL2000 several times a day for archiving for 6 years and just delete the archived records from servicestatus_history.

--
Marc

> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Sandoval, Julio
> Sent: Friday, July 29, 2005 11:10 AM
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Postgresql
> 
> Dear List,
> 
> 	I need to know....how can i hold data in postgresql for one year?,
> before that i can archive data in historic store.
> 	 Thank so much for  your responses....
> 
> 	Greetings, Julio Sandoval
> 
> 
> 
> 		-----Mensaje original-----
> 		De: nagios-users-admin at lists.sourceforge.net [mailto:nagios-
> users-admin at lists.sourceforge.net]En nombre de Sandoval, Julio
> 		Enviado el: Viernes, 15 de Julio de 2005 11:38
> 		Para: nagios-users at lists.sourceforge.net
> 		Asunto: [Nagios-users] Postgresql
> 
> 
> 		Hello everybody,
> 		I have a question: ¿Where can I find the history data in
> postgresql?
> 		Exp. I saw the data in the 12 tables, but I just look few rows
> in them (30 rows max).
> 
> 		Somebody help me with this...
> 		Thank for your kindness
> 
> 
> ________________________________
> 
> 		"Este mensaje y cualquier archivo adjunto es confidencial y
> está destinado a la persona o entidad a quién ha sido dirigido. Si usted
> no es el receptor individualizado en el mismo, le solicitamos notificar de
> ello al remitente de manera inmediata, estando prohibido y sancionado por
> la ley cualquier almacenamiento, divulgación, distribución o copia de su
> contenido."
> 
> 
> 
> 
> ________________________________
> 
> 	"Este mensaje y cualquier archivo adjunto es confidencial y está
> destinado a la persona o entidad a quién ha sido dirigido. Si usted no es
> el receptor individualizado en el mismo, le solicitamos notificar de ello
> al remitente de manera inmediata, estando prohibido y sancionado por la
> ley cualquier almacenamiento, divulgación, distribución o copia de su
> contenido."
> 
> 
> 
> ________________________________
> 
> "Este mensaje y cualquier archivo adjunto es confidencial y está destinado
> a la persona o entidad a quién ha sido dirigido. Si usted no es el
> receptor individualizado en el mismo, le solicitamos notificar de ello al
> remitente de manera inmediata, estando prohibido y sancionado por la ley
> cualquier almacenamiento, divulgación, distribución o copia de su
> contenido."



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list