Node default { }Class { “ossec::client”:ossec_server_ip => “Ossec.Server.IP.Address”}
Note: site.pp currently located at directory /etc/puppet/manifests/site.pp
Hi Eric,
I have a few questions to better understand actual installation:
After that it’s easy, you only need to add to your manifest site.pp the manager configuration, similar than:
node "server.yourhost.com" {
class { 'ossec::server':
mailserver_ip => 'localhost',
ossec_emailto => ['us...@mycompany.com'],
use_mysql => true,
mysql_hostname => '127.0.0.1',
mysql_name => 'ossec',
mysql_password => 'yourpassword',
mysql_username => 'ossec',
}
}
Run in your server.yourhost.com this command puppet agent --no-daemonize --debug --trace to verify the installation in debug mode.
If all run nice you need to add to your manifest in the Puppet server the agent configuration:
node "client.yourhost.com" {
class { "ossec::client":
ossec_server_ip => "Ossec.Server.IP.Address"
}
}
and run the same command than in your manager puppet agent --no-daemonize --debug --trace.
After finish the installation, your client has a client.keys file created in /var/ossec/etc/client.keys, and saved in Export Resources.
The last step is copy the agent client.keys to the Ossec manager, we do that running again puppet agent --no-daemonize --debug --trace, in order to made Puppet ask to Export resources for new configuration, and export resources ship the client.keys to the Ossec manager.
A brief summary:
puppet agent --no-daemonize --debug --tracepuppet agent --no-daemonize --debug --trace--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/297caa22-5a35-4f18-b43e-03b50ede3fbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- I have a Fresh Puppet installation just for ossec.
- I am not sure exactly what is meant by Export Resources, however, I am in process of confirming the PuppetDB is installed and working to correctly act as the export resource receiver for client content. In particular the mentioned client.keys content.
- I will update on thread with PuppetDB working status once available.
- Export Resource Puppet Documentation
- Puppet Manager OS is CENTOS 6
- I will post with updated results on the remaining suggestions after confirming working Export Resource.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/297caa22-5a35-4f18-b43e-03b50ede3fbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/37795950-699e-49b4-906d-8a5fa744eb4d%40googlegroups.com.
$ sudo rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
$ yum install puppetdb-terminus.noarch puppetdb postgresql94-server postgresql94 postgresql94-contrib.x86_64
$ sudo /usr/pgsql-9.4/bin/postgresql94-setup initdb
$ service puppetdb start
$ vi /var/lib/pgsql/9.4/data/pg_hba.conf – CentOS
Change to md5$ su postgres
/usr/pgsql-9.4/bin/pg_ctl -D /var/lib/pgsql/9.4/data -l logfile start
Createuser -DRSP puppetdb
Enter password 2x
Created -O puppetdb puppetdb$ psql -h 127.0.0.1 -p 5432 -U puppetdb -W puppetdb
Password for user puppetdb:
psql (8.4.13)
Type "help" for help.
puppetdb=> CREATE EXTENSION pg_trgm;
puppetdb=> \q$ vi /etc/puppetdb/conf.d/database.iniclassname = org.postgresql.Driver
subprotocol = postgresql
subname = //127.0.0.1:5432/puppetdb
username = puppetdb
password = yourpassword
log-slow-statements = 10
node "default" {
class { "ossec::client":
ossec_server_ip => "Ossec.Server.IP.Address"
}
}
[main]
server_urls = https://puppetdb.company.FQDN.com:8081
---master:facts:terminus: puppetdbcache: yaml
ON SERVER$ puppet agent –no-daemonize –debug –traceNo outputON AGENT$ puppet agent –no-daemonize –debug –trace
Hi Erick,
Looks like puppetdb is not working properly.
Can you review the next configuration?
Review if your puppetdb has created the tables in your database:
[root@localhost puppet]# psql -h 127.0.0.1 -p 5432 -U puppetdb -W puppetdb
Password for user puppetdb:
psql (9.4.9)
Type "help" for help.
puppetdb=> \dt
List of relations
Schema | Name | Type | Owner
--------+-----------------------+-------+----------
public | catalog_resources | table | puppetdb
public | catalogs | table | puppetdb
public | certnames | table | puppetdb
public | edges | table | puppetdb
public | environments | table | puppetdb
public | fact_paths | table | puppetdb
public | fact_values | table | puppetdb
public | facts | table | puppetdb
public | factsets | table | puppetdb
public | producers | table | puppetdb
public | report_statuses | table | puppetdb
public | reports | table | puppetdb
public | resource_events | table | puppetdb
public | resource_params | table | puppetdb
public | resource_params_cache | table | puppetdb
public | schema_migrations | table | puppetdb
public | value_types | table | puppetdb
(17 rows)
puppetdb=>
If not please be sure the password is correct:
classname = org.postgresql.Driver
subprotocol = postgresql
subname = //127.0.0.1:5432/puppetdb
username = puppetdb
password = yourpassword
log-slow-statements = 10
Please be sure the server is accesible by DNS, you can try a $ ping puppetdb.company.FQDN.com in the same machine and if you have any firewall running open the por 8081.
server_urls = https://puppetdb.company.FQDN.com:8081
After review that restart puppetdb and puppetserver, look the logs from both, and search any error.
On October 2, 2016 at 3:03:39 AM, Eric Adkins (eaad...@rams.colostate.edu) wrote:
/var/lib/pgsql/9.4/data/pg_hba.conf
psql -h 127.0.0.1 -p 5432 -U puppetdb -W puppetdb
\dt
puppetdb=> \dt
List of relations
Schema | Name | Type | Owner
--------+-----------------------+-------+----------
public | catalog_resources | table | puppetdb
public | catalogs | table | puppetdb
public | certnames | table | puppetdb
public | edges | table | puppetdb
public | environments | table | puppetdb
public | fact_paths | table | puppetdb
public | fact_values | table | puppetdb
public | facts | table | puppetdb
public | factsets | table | puppetdb
public | producers | table | puppetdb
public | report_statuses | table | puppetdb
public | reports | table | puppetdb
public | resource_events | table | puppetdb
public | resource_params | table | puppetdb
public | resource_params_cache | table | puppetdb
public | schema_migrations | table | puppetdb
public | value_types | table | puppetdbpuppetdb ssl-setup
PEM files in /etc/puppetlabs/puppetdb/ssl already exists, checking integrity.
Setting ssl-host in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-port in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-key in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-ca-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct/var/log/messages/var/log/puppetlabs/puppetdb/puppetdb.log puppetdb ssl-setup
PEM files in /etc/puppetlabs/puppetdb/ssl already exists, checking integrity.Setting ssl-host in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.Setting ssl-port in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.Setting ssl-key in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.Setting ssl-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.Setting ssl-ca-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
.
Please be sure the server is accesible by DNS, you can try a
$ ping puppetdb.company.FQDN.comin the same machine and if you have any firewall running open the port8081.
server_urls = https://puppetdb.company.FQDN.com:8081After review that restart puppetdb and puppetserver, look the logs from both, and search any error.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/3a8bcf02-e43a-43d9-9611-d606f1b0d495%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
Hi Eric
A estandar definition for a client should be like:
node "client.yourhost.com" {
class { "ossec::client":
ossec_server_ip => "192.168.209.166"
}
}
where client.yourhost.com is the name from the agent puppet certificate.
So if you run $ puppet cert list --all
The result is all puppet agents registered in your server.
You need to use as node name the cert name.
[root@centos1 manifests]# puppet cert list --all
+ “centos1.wazuh.com" (B4:52:73:D6:22:9B:55:35:E7:E3:DE:51:48:67:30:A0) (alt names: "DNS:centos1.example.com", "DNS:puppet", "DNS:puppet.example.com")
+ “centos2.wazuh.com" (B3:A6:A3:F2:2F:AA:7F:7A:25:37:8B:27:7A:E1:8C:77)
This is an example in this case we should use
node “centos1.wazuh.com" {
class { "ossec::client":
ossec_server_ip => "192.168.209.166"
}
}
node “centos2.wazuh.com" {
class { "ossec::client":
ossec_server_ip => "192.168.209.166"
}
}
Of course if you do a ping to any of the names certificates the name need to be resolved by DNS.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/2e9f8f2a-a00c-485e-bd59-9205c08665ce%40googlegroups.com.
puppet agent –no-daemonize –debug –trace
see attachment for full output
Error: Cannot create /var/ossec/logs; parent directory /var/ossec does not exist...
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /var/ossec/etc/ossec.conf20161014-32062-1dmzrx9.lock
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/11b08a7b-6c9a-4885-a409-7228e143ba65%40googlegroups.com.
<PuppetError.txt>
cat /etc/redhat-release
CentOS release 6.8 (Final)$ sudo yum install make gcc git
$ sudo yum install openssl-devel
$ cd ~
$ mkdir ossec_tmp && cd ossec_tmp
$ git clone -b stable https://github.com/wazuh/ossec-wazuh.git
$ cd ossec-wazuh
$ sudo ./install.sh
choose "server"
$ sudo /var/ossec/bin/ossec-control start puppet agent --no-daemonize --debug –traceHi Eric
Wonderful news,
Try run this command:
$ rpm -qa | grep ossec
If this command is successful and shows you Ossec-HIDS, it means that you have the package ossec-hids 2.8.3 installed.
The current Puppet module is only compatible with ossec-hids 2.8.3. We will have a new module for the Ossec Wazuh Version soon. You now have two options:
2.- Delete Wazuh, remove also the package ossec-hids 2.8.3 and run puppet again in the server to install, remember, the Ossec-HIDS 2.8.3 with puppet.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/bbf4faf4-b8ec-4f3f-b4f5-153abe3ea61d%40googlegroups.com.
puppet run puppet agent --no-daemonize --debug –tracepuppet agent --no-daemonize --debug –traceTo unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/884bdefb-accc-4b06-8792-d9ca2b1775b6%40googlegroups.com.
puppet run puppet agent --no-daemonize --debug –trace
puppet run puppet agent --no-daemonize --debug –trace
puppet run puppet agent --no-daemonize --debug –trace
vi /var/lib/puppet/state/last_run_summary.yaml
Hi Eric
Its very weird, can you take a look fro this two tables in the database and verify if you have information inside?
puppetdb=# select * from certnames ;
id | certname | latest_report_id | deactivated | expired
----+-----------------------------+------------------+-------------+---------
1 | localhost.localdomain | | |
2 | agente.xxxxxxx.com | | |
3 | ubuntu.xxxxxxx.com | | |
4 | agent.xxxxxxxxxxx | | |
5 | desktop-cv0cpi7.xxxxxxxxxxx | | |
puppetdb=# select * from catalogs;
id | hash | transaction_uuid | certname | producer_timestamp | api_version | timestamp | catalog_version | environment_id | code_id | catalog_uui
d | producer_id
----+--------------------------------------------+--------------------------------------+-----------------------------+----------------------------+-------------+----------------------------+-----------------+----------------+---------+------------------------
--------------+-------------
5 | \xaff36436c2515e61d64dfcf850fb8c8d7faf0411 | 8990ef90-c094-417a-8b6d-d176aa2b0787 | desktop-cv0cpi7.xxxxxxxxxxx | 2016-07-28 14:35:33.99-05 | 1 | 2016-07-28 14:35:34.516-05 | 1469734530 | 1 | | ea7af532-0c8b-4dda-ba49
-1ccc6edf605f |
2 | \x3572733b6e2bef5ea65539f8980da374764b0390 | 7df2adf6-e014-4811-a802-a6d0ddbe805a | agente.xxxxxxx.com | 2016-07-05 15:38:33.633-05 | 1 | 2016-07-05 15:38:33.818-05 | 1467751112 | 1 | | a54d9240-11cf-469b-b788
-7e05cc00d39b |
3 | \xf8e16747b8a7dc6a2304f0695b4622395598f61a | 04bc0066-f1aa-4309-8eeb-2fd2b6111392 | ubuntu.xxxxxxx.com | 2016-07-06 14:05:36.082-05 | 1 | 2016-07-06 14:05:36.322-05 | 1467831934 | 1 | | 1b375089-99e3-4663-9a4f
-b56c3556810c |
4 | \x809317e3578a301342973148c28f74d3ac435157 | 88795fce-438a-4698-ae77-3c3536080e21 | agent.xxxxxxxxxxx | 2016-10-20 11:40:43.489-05 | 1 | 2016-10-20 11:40:43.608-05 | 1476981642 | 1 | | 26d12062-430e-450e-aeda
-2ae8a1c63796 | 1
1 | \x9481fe3ad169a608274fa6683479aedbff75281a | 48bfc809-6d25-4447-b390-dfa4c36bdfc1 | localhost.xxxxxxxxxxx | 2016-10-20 11:49:09.954-05 | 1 | 2016-10-20 11:49:10.096-05 | 1476982148 | 1 | | 49e127d0-7eb2-424c-93db
-2b0841a1922e | 1
(5 rows)
In this two tables you need to have the list from all your machines included the ossec manager.
and can you show me the site.pp from the manager please?
Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/7ec237d4-e094-4dba-bc17-e5e6a611f0c7%40googlegroups.com.