[pmacct-discussion] TimescaleDB

2022-05-03 Thread John Jensen
Hi all,

Has anyone successfully used TimescaleDB as a backend for pmacctd? I
understand that TimescaleDB is essentially just a Postgres extension - does
this mean that nothing really "changes" in terms of configuring pmacct to
insert into a traditional SQL database (Postgres)?

Thanks in advance!

-JJ
___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists


Re: [pmacct-discussion] docker

2021-10-01 Thread John Jensen
Hey Steve,

It is the proper solution.

To add some context, if you don't pass '-it' (-i keeps STDIN open on the
container and -t allocates a pseudo-TTY and attaches it to the STDIN of the
container) or '-d' (which spawns the container in 'detached' mode, which
will return your running container ID) to 'docker run', it defaults to
running your container in 'foreground mode'. When you ran your first docker
command, did you get presented with essentially nothing until you killed
the container with ctrl+c? I believe the default in foreground mode is to
attach the host's STDIN/STDOUT/STDERR to that of the container, so if you
essentially "saw nothing" then I would have expected you to see pmacct
running in 'ps' output in a different shell on the same box.

The second 'docker run' command works because you're overriding the
entrypoint of the container at runtime to /bin/bash (as well as specifying
-it to 'docker run'), which would drop you to a bash shell inside the
container, where you can manually invoke pmacct.

You'll almost always see processes run inside of containers (ie pmacct,
webservers, etc) configured to run in the foreground by convention, because
you're already daemonizing/detaching "up a level" when you pass the -d flag
to 'docker run' - this allows the process running inside of the container
to send logs to STDOUT/STDERR which you can then look at by running the
'docker logs ' command.

HTH

-JJ

On Fri, Oct 1, 2021 at 12:29 PM Steve Clark  wrote:

> Hi,
>
> I found if I set daemonize: false in my pmacctd.conf file and use the -d
> flag on the docker run line it seems to work.
>
> Don't know if this is the proper solution though.
>
> Thanks,
> Steve
>
> On 10/1/21 7:21 AM, Steve Clark wrote:
> > Hello,
> >
> >
> > I am having trouble getting the "latest" or "bleeding-edge" docker image
> to run by using the following command:
> > docker run --privileged --network host -v
> /etc/pmacct_netwolves/pmacctd.conf:/etc/pmacct/pmacctd.conf
> pmacct/pmacctd:bleeding-edge
> > $ docker ps
> > CONTAINER ID   IMAGE COMMAND   CREATED   STATUSPORTS NAMES
> > Fri Oct  1 07:15:37 EDT 2021
> >
> > but if I run the following command and then inside the container I run
> pmaccd -f /etc/pmacct/pmacctd - it works
> > docker run -it --privileged --network host -v
> /etc/pmacct_netwolves/pmacctd.conf:/etc/pmacct/pmacctd.conf --entrypoint
> /bin/bash  pmacct/pmacctd:bleeding-edge
> >
> > from another login on the same system
> > V990002:~
> > $ docker ps
> > CONTAINER ID   IMAGE  COMMAND CREATED
> STATUS  PORTS NAMES
> > d4b0beab1b0b   pmacct/pmacctd:bleeding-edge   "/bin/bash"   46 seconds
> ago   Up 45 seconds silly_volhard
> > Fri Oct  1 07:17:53 EDT 2021
> > V990002:~
> > $ ps awx|grep pmacct
> > 18718 pts/1Sl+0:00 docker run -it --privileged --network host -v
> /etc/pmacct_netwolves/pmacctd.conf:/etc/pmacct/pmacctd.conf --entrypoint
> /bin/bash pmacct/pmacctd:bleeding-edge
> > 18853 ?Ss 0:02 pmacctd: Core Process [default]
> > 18856 ?S  0:00 pmacctd: Netflow Probe Plugin [eth1]
> > 19348 pts/2S+ 0:00 grep --color=auto pmacct
> >
> > My system is CentOS 7.
> > docker-ce-20.10.8-3.el7.x86_64
> >
> > Also I must add I am docker noobie.
> > Email Confidentiality Notice: The information contained in this
> transmission may contain privileged and confidential and/or protected
> health information (PHI) and may be subject to protection under the law,
> including the Health Insurance Portability and Accountability Act of 1996,
> as amended (HIPAA). This transmission is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, dissemination, distribution,
> printing or copying of this transmission is strictly prohibited and may
> subject you to criminal or civil penalties. If you have received this
> transmission in error, please contact the sender immediately and delete
> this email and any attachments from any computer. Vaso Corporation and its
> subsidiary companies are not responsible for data leaks that result from
> email messages received that contain privileged and confidential and/or
> protected health information (PHI).
> >
> > ___
> > pmacct-discussion mailing list
> > http://www.pmacct.net/#mailinglists
>
> Email Confidentiality Notice: The information contained in this
> transmission may contain privileged and confidential and/or protected
> health information (PHI) and may be subject to protection under the law,
> including the Health Insurance Portability and Accountability Act of 1996,
> as amended (HIPAA). This transmission is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, dissemination, distribution,
> printing or copying of this transmission is strictly prohibited and